mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-08 02:08:02 +02:00
* dbus/dbus-spawn.c,dbus/dbus-spawn.h (_dbus_spawn_async_with_babysitter):
added environment pointer as function parameter,used on win32. * test/spawn-test.c: fixed call to above mentioned function.
This commit is contained in:
parent
7f3af4748f
commit
329f99a197
4 changed files with 15 additions and 5 deletions
|
|
@ -1,3 +1,10 @@
|
|||
2007-03-04 Ralf Habacker <ralf.habacker@freenet.de>
|
||||
|
||||
* dbus/dbus-spawn.c,dbus/dbus-spawn.h (_dbus_spawn_async_with_babysitter):
|
||||
added environment pointer as function parameter, used on win32.
|
||||
|
||||
* test/spawn-test.c: fixed call to above mentioned function.
|
||||
|
||||
2007-03-04 Ralf Habacker <ralf.habacker@freenet.de>
|
||||
|
||||
* configure.in,test/test-sleep-forever.c,test/test-names.c:
|
||||
|
|
|
|||
|
|
@ -1021,6 +1021,7 @@ babysit (pid_t grandchild_pid,
|
|||
*
|
||||
* @param sitter_p return location for babysitter or #NULL
|
||||
* @param argv the executable and arguments
|
||||
* @param env the environment (not used on unix yet)
|
||||
* @param child_setup function to call in child pre-exec()
|
||||
* @param user_data user data for setup function
|
||||
* @param error error object to be filled in if function fails
|
||||
|
|
@ -1029,6 +1030,7 @@ babysit (pid_t grandchild_pid,
|
|||
dbus_bool_t
|
||||
_dbus_spawn_async_with_babysitter (DBusBabysitter **sitter_p,
|
||||
char **argv,
|
||||
char **env,
|
||||
DBusSpawnChildSetupFunc child_setup,
|
||||
void *user_data,
|
||||
DBusError *error)
|
||||
|
|
@ -1217,7 +1219,7 @@ check_spawn_nonexistent (void *data)
|
|||
|
||||
argv[0] = "/this/does/not/exist/32542sdgafgafdg";
|
||||
if (_dbus_spawn_async_with_babysitter (&sitter, argv,
|
||||
NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
&error))
|
||||
{
|
||||
_dbus_babysitter_block_for_child_exit (sitter);
|
||||
|
|
@ -1262,7 +1264,7 @@ check_spawn_segfault (void *data)
|
|||
|
||||
argv[0] = TEST_SEGFAULT_BINARY;
|
||||
if (_dbus_spawn_async_with_babysitter (&sitter, argv,
|
||||
NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
&error))
|
||||
{
|
||||
_dbus_babysitter_block_for_child_exit (sitter);
|
||||
|
|
@ -1307,7 +1309,7 @@ check_spawn_exit (void *data)
|
|||
|
||||
argv[0] = TEST_EXIT_BINARY;
|
||||
if (_dbus_spawn_async_with_babysitter (&sitter, argv,
|
||||
NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
&error))
|
||||
{
|
||||
_dbus_babysitter_block_for_child_exit (sitter);
|
||||
|
|
@ -1352,7 +1354,7 @@ check_spawn_and_kill (void *data)
|
|||
|
||||
argv[0] = TEST_SLEEP_FOREVER_BINARY;
|
||||
if (_dbus_spawn_async_with_babysitter (&sitter, argv,
|
||||
NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
&error))
|
||||
{
|
||||
_dbus_babysitter_kill_child (sitter);
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ typedef struct DBusBabysitter DBusBabysitter;
|
|||
|
||||
dbus_bool_t _dbus_spawn_async_with_babysitter (DBusBabysitter **sitter_p,
|
||||
char **argv,
|
||||
char **env,
|
||||
DBusSpawnChildSetupFunc child_setup,
|
||||
void *user_data,
|
||||
DBusError *error);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ main (int argc, char **argv)
|
|||
argv_copy [i] = argv[i + 1];
|
||||
argv_copy[argc - 1] = NULL;
|
||||
|
||||
if (!_dbus_spawn_async_with_babysitter (NULL, argv_copy, setup_func, NULL, &error))
|
||||
if (!_dbus_spawn_async_with_babysitter (NULL, argv_copy, NULL, setup_func, NULL, &error))
|
||||
{
|
||||
fprintf (stderr, "Could not launch application: \"%s\"\n",
|
||||
error.message);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue