diff options
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/src/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk/src/main.c b/gtk/src/main.c index 20e9f8518..c26966db2 100644 --- a/gtk/src/main.c +++ b/gtk/src/main.c @@ -658,7 +658,12 @@ IoRedirect(signal_user_data_t *ud) // Set encoding to raw. g_io_channel_set_encoding (ud->activity_log, NULL, NULL); // redirect stderr to the writer end of the pipe +#if defined(_WIN32) + // dup2 doesn't work on windows for some stupid reason + stderr->_file = pfd[1]; +#else dup2(pfd[1], /*stderr*/2); +#endif setvbuf(stderr, NULL, _IONBF, 0); channel = g_io_channel_unix_new (pfd[0]); // I was getting an this error: |