summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2014-12-03 17:18:09 +0100
committerAndreas Baumann <abaumann@yahoo.com>2014-12-03 17:18:09 +0100
commit940697457b10e9fcd61f3f869715a2547f2b10d1 (patch)
tree2d8dda95d840c7bc9fba85d1a4b004694d9a8d58 /src
parent03ce70a03a9255daa035c2150a429a2c4fc8d1cf (diff)
downloadbiruda-940697457b10e9fcd61f3f869715a2547f2b10d1.tar.gz
biruda-940697457b10e9fcd61f3f869715a2547f2b10d1.tar.bz2
worker works on Windows
Diffstat (limited to 'src')
-rw-r--r--src/NMakefile2
-rw-r--r--src/biruda.conf1
-rw-r--r--src/worker.c5
3 files changed, 6 insertions, 2 deletions
diff --git a/src/NMakefile b/src/NMakefile
index a618a85..7c940e4 100644
--- a/src/NMakefile
+++ b/src/NMakefile
@@ -66,6 +66,7 @@ workertest.obh: workertest.c
clean:
@-erase *.obj 2>NUL
@-erase *.dll 2>NUL
+ @-erase gspawn-win32-helper-console.exe 2>NUL
@-erase biruda.exe workertest.exe 2>NUL
@-erase biruda_cmdline.h biruda_cmdline.c 2>NUL
@@ -77,5 +78,6 @@ run: all
@-copy "$(GTK3_BUNDLE_DIR)\bin\libintl-8.dll" .
@-copy "$(GTK3_BUNDLE_DIR)\bin\libiconv-2.dll" .
@-copy "$(GTK3_BUNDLE_DIR)\bin\pthreadGC2.dll" .
+ @-copy "$(GTK3_BUNDLE_DIR)\bin\gspawn-win32-helper-console.exe .
@-biruda -c biruda.conf -p
diff --git a/src/biruda.conf b/src/biruda.conf
index a1cae1d..6862c7a 100644
--- a/src/biruda.conf
+++ b/src/biruda.conf
@@ -21,6 +21,7 @@ worker worker1
control = "tcp://localhost:5555"
execution = direct
command = "./workertest"
+# command = "workertest.exe"
}
worker worker2
diff --git a/src/worker.c b/src/worker.c
index adb3083..b290855 100644
--- a/src/worker.c
+++ b/src/worker.c
@@ -82,11 +82,12 @@ static void *worker_func( void *thread_data )
gchar *argv[] = { worker->command, NULL };
+ GError *error = NULL;
gboolean ret = g_spawn_async_with_pipes( NULL,
argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD, NULL,
- NULL, &wed->pid, NULL, &wed->out, &wed->err, NULL );
+ NULL, &wed->pid, NULL, &wed->out, &wed->err, &error );
if( !ret ) {
- g_error( "Starting worker failed" );
+ fprintf( stderr, "ERROR: Starting worker failed: %s\n", error->message );
return NULL;
}