]> code.delx.au - pulseaudio/blobdiff - src/modules/module-cli.c
use pa_fopen_cloexec() where applicable
[pulseaudio] / src / modules / module-cli.c
index 6bd0f4fc8520dc3887fbb659a3743fa7f7299f5d..c5ff456464b8c9d37228b8af82d537c86e4c60f3 100644 (file)
@@ -105,7 +105,7 @@ int pa__init(pa_module*m) {
      * of log messages, particularly because if stdout and stderr are
      * dup'ed they share the same O_NDELAY, too. */
 
-    if ((fd = open("/dev/tty", O_RDWR|O_CLOEXEC|O_NONBLOCK)) >= 0) {
+    if ((fd = pa_open_cloexec("/dev/tty", O_RDWR|O_NONBLOCK, 0)) >= 0) {
         io = pa_iochannel_new(m->core->mainloop, fd, fd);
         pa_log_debug("Managed to open /dev/tty.");
     } else {