summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2015-04-09 19:07:47 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2015-04-09 19:07:47 +0200
commite2445d4071c05df2d0558b8fcf9616aeb73a4810 (patch)
treeac721980ef0680d5edaae848df62dfc60804e272
parent84bb8f5254dfd5ceaeeff0da35143756ab387625 (diff)
downloadbiruda-e2445d4071c05df2d0558b8fcf9616aeb73a4810.tar.gz
biruda-e2445d4071c05df2d0558b8fcf9616aeb73a4810.tar.bz2
fixed for missing g_spawn_check_exit_status and strcasecmp
-rw-r--r--src/worker.c5
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 );