commit c6bb9dd1df10c49b11ac65db138fc3f34757bb41
Author: Clint Adams <schizo@debian.org>
Date: Sun Oct 25 12:35:14 2009 +0000
Work around some platforms not having O_CLOEXEC
diff --git a/src/modules/module-cli.c b/src/modules/module-cli.c
index 6bd0f4f..b1adb52 100644
|
a
|
b
|
|
| 105 | 105 | * of log messages, particularly because if stdout and stderr are |
| 106 | 106 | * dup'ed they share the same O_NDELAY, too. */ |
| 107 | 107 | |
| | 108 | #ifdef O_CLOEXEC |
| 108 | 109 | if ((fd = open("/dev/tty", O_RDWR|O_CLOEXEC|O_NONBLOCK)) >= 0) { |
| | 110 | #else |
| | 111 | if ((fd = open("/dev/tty", O_RDWR|O_NONBLOCK)) >= 0) { |
| | 112 | pa_make_fd_cloexec(fd); |
| | 113 | #endif |
| 109 | 114 | io = pa_iochannel_new(m->core->mainloop, fd, fd); |
| 110 | 115 | pa_log_debug("Managed to open /dev/tty."); |
| 111 | 116 | } else { |