diff options
Diffstat (limited to 'src/worker.c')
-rw-r--r-- | src/worker.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/worker.c b/src/worker.c index 75eb779..3ae7672 100644 --- a/src/worker.c +++ b/src/worker.c @@ -11,6 +11,7 @@ #include <stdio.h> #include <string.h> +#include <strings.h> #include <stdlib.h> #include <signal.h> @@ -203,6 +204,7 @@ static void watch_child( GPid pid, gint status, gpointer *data ) GError *error = NULL; char *exit_message = "<unknown error>"; +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_34 if( g_spawn_check_exit_status( status, &error ) ) { if( error != NULL ) { exit_message = error->message; @@ -211,6 +213,9 @@ static void watch_child( GPid pid, gint status, gpointer *data ) exit_message = "<success>"; } } +#else + // TODO: do it in the old platform dependend way +#endif printf( "Worker child with PID " PRIgid " terminated with status %d: %s.\n", wed->pid, status, exit_message ); |