ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #02906
[Branch ~indicator-applet-developers/dbus-test-runner/trunk] Rev 29: Better handle tasks that can't be started
------------------------------------------------------------
revno: 29
committer: Ted Gould <ted@xxxxxxxx>
branch nick: trunk
timestamp: Fri 2011-01-28 10:36:44 -0600
message:
Better handle tasks that can't be started
modified:
src/dbus-test-runner.c
--
lp:dbus-test-runner
https://code.launchpad.net/~indicator-applet-developers/dbus-test-runner/trunk
Your team ayatana-commits is subscribed to branch lp:dbus-test-runner.
To unsubscribe from this branch go to https://code.launchpad.net/~indicator-applet-developers/dbus-test-runner/trunk/+edit-subscription
=== modified file 'src/dbus-test-runner.c'
--- src/dbus-test-runner.c 2011-01-28 16:30:01 +0000
+++ src/dbus-test-runner.c 2011-01-28 16:36:44 +0000
@@ -287,7 +287,9 @@
global_success = FALSE;
}
- g_spawn_close_pid(pid);
+ if (pid != 0) {
+ g_spawn_close_pid(pid);
+ }
task->task_die = TRUE;
@@ -328,6 +330,7 @@
void
start_task (gpointer data, gpointer userdata)
{
+ GError * error = NULL;
task_t * task = (task_t *)data;
gchar ** argv;
@@ -350,9 +353,15 @@
NULL, /* stdin */
&proc_stdout, /* stdout */
NULL, /* stderr */
- NULL); /* error */
+ &error); /* error */
g_free(argv);
+ if (error != NULL) {
+ g_warning("Unable to start task '%s': %s", task->name, error->message);
+ proc_watcher(0, 1, task);
+ return;
+ }
+
g_debug("Started task '%s' PID: %d", task->name, task->pid);
GIOChannel * iochan = g_io_channel_unix_new(proc_stdout);