#include <config.h>
#endif
-#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
pa_memchunk_reset(chunk);
- if ((fd = open(fname, O_RDONLY
-#ifdef O_NOCTTY
- |O_NOCTTY
-#endif
- )) < 0) {
+ if ((fd = pa_open_cloexec(fname, O_RDONLY, 0)) < 0) {
pa_log("Failed to open file %s: %s", fname, pa_cstrerror(errno));
goto finish;
}