diff options
Diffstat (limited to 'src/worker.c')
-rw-r--r-- | src/worker.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/worker.c b/src/worker.c index 99ad6bd..6dc4501 100644 --- a/src/worker.c +++ b/src/worker.c @@ -136,8 +136,9 @@ static void *worker_func( void *thread_data ) wed->err_channel = g_io_channel_unix_new( wed->err ); #endif - g_io_add_watch( wed->out_channel, GIOCondition( G_IO_IN | G_IO_HUP ), (GIOFunc)watch_output, (gpointer *)wed ); - g_io_add_watch( wed->err_channel, GIOCondition( G_IO_IN | G_IO_HUP ), (GIOFunc)watch_output, (gpointer *)wed ); + GIOCondition cond = G_IO_IN | G_IO_HUP; + g_io_add_watch( wed->out_channel, cond, (GIOFunc)watch_output, (gpointer *)wed ); + g_io_add_watch( wed->err_channel, cond, (GIOFunc)watch_output, (gpointer *)wed ); worker->state = WORKER_STATE_RUNNING; |