summaryrefslogtreecommitdiff
path: root/src/modules/module-cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/module-cli.c')
-rw-r--r--src/modules/module-cli.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/module-cli.c b/src/modules/module-cli.c
index c5ff45646..90ce3b63d 100644
--- a/src/modules/module-cli.c
+++ b/src/modules/module-cli.c
@@ -105,10 +105,14 @@ 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. */
+#ifndef OS_IS_WIN32
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 {
+ }
+ else
+#endif
+ {
io = pa_iochannel_new(m->core->mainloop, STDIN_FILENO, STDOUT_FILENO);
pa_iochannel_set_noclose(io, TRUE);
pa_log_debug("Failed to open /dev/tty, using stdin/stdout fds instead.");