diff options
author | Havoc Pennington <hp@redhat.com> | 2007-07-24 22:11:00 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2007-07-24 22:11:00 +0000 |
commit | 79d3004e26f490ef37ae0298495ea66f322ce374 (patch) | |
tree | e42cc442c8e24330a1b1cc5446338befde93e3a6 /bus/activation.c | |
parent | 0b5478e49e250a85102ee0bf711609466a9437eb (diff) |
2007-07-24 Havoc Pennington <hp@redhat.com>
* configure.in: add AM_PROG_CC_C_O to allow per-target CPPFLAGS
* bus/dispatch.c (bus_dispatch_test_conf): Fix up setting
TEST_LAUNCH_HELPER_CONFIG to include the full path, and enable
test shell_fail_service_auto_start when use_launcher==TRUE
* bus/activation-helper-bin.c (convert_error_to_exit_code): pass
through the INVALID_ARGS error so the test suite works
* bus/activation.c (handle_activation_exit_error): return
DBUS_ERROR_NO_MEMORY if we get BUS_SPAWN_EXIT_CODE_NO_MEMORY
* dbus/dbus-spawn.c (_dbus_babysitter_get_child_exit_status):
return only the exit code of the child, not the entire thingy from
waitpid(), and make the return value indicate whether the child
exited normally (with a status code)
* bus/bus.c (process_config_first_time_only): _dbus_strdup works
on NULL so no need to check
(process_config_every_time): move servicehelper init here, so we
reload it on HUP or config file change
* bus/Makefile.am (install-data-hook): remove comment because
Emacs make mode seems to be grumpy about it
Diffstat (limited to 'bus/activation.c')
-rw-r--r-- | bus/activation.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/bus/activation.c b/bus/activation.c index c49bc881..d5162ec2 100644 --- a/bus/activation.c +++ b/bus/activation.c @@ -1122,13 +1122,14 @@ pending_activation_failed (BusPendingActivation *pending_activation, * Depending on the exit code of the helper, set the error accordingly */ static void -handle_activation_exit_error (int exit_code, DBusError *error) +handle_activation_exit_error (int exit_code, + DBusError *error) { switch (exit_code) { case BUS_SPAWN_EXIT_CODE_NO_MEMORY: - dbus_set_error (error, DBUS_ERROR_SPAWN_SETUP_FAILED, - "Launcher could not run as out of memory"); + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, + "Launcher could not run (out of memory)"); break; case BUS_SPAWN_EXIT_CODE_SETUP_FAILED: dbus_set_error (error, DBUS_ERROR_SPAWN_SETUP_FAILED, @@ -1154,6 +1155,10 @@ handle_activation_exit_error (int exit_code, DBusError *error) dbus_set_error (error, DBUS_ERROR_SPAWN_EXEC_FAILED, "Cannot launch daemon, file not found or permissions invalid"); break; + case BUS_SPAWN_EXIT_CODE_INVALID_ARGS: + dbus_set_error (error, DBUS_ERROR_INVALID_ARGS, + "Invalid arguments to command line"); + break; default: dbus_set_error (error, DBUS_ERROR_SPAWN_CHILD_EXITED, "Launch helper exited with unknown return code %i", exit_code); |