projects
/
platform
/
upstream
/
dbus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[daemon-fix] fixed getting uid and pid when transport is not kdbus
[platform/upstream/dbus.git]
/
test
/
spawn-test.c
diff --git
a/test/spawn-test.c
b/test/spawn-test.c
index
fda0309
..
e6513fa
100644
(file)
--- a/
test/spawn-test.c
+++ b/
test/spawn-test.c
@@
-1,10
+1,16
@@
+#include <config.h>
#include <dbus/dbus.h>
#include <dbus/dbus.h>
-#define DBUS_COMPILATION /* cheat and use dbus-sysdeps */
#include <dbus/dbus-sysdeps.h>
#include <dbus/dbus-sysdeps.h>
-#
undef DBUS_COMPILATION
+#
include <dbus/dbus-spawn.h>
#include <stdio.h>
#include <stdio.h>
+static void
+setup_func (void *data)
+{
+ printf ("entering setup func.\n");
+}
+
int
main (int argc, char **argv)
{
int
main (int argc, char **argv)
{
@@
-24,11
+30,13
@@
main (int argc, char **argv)
argv_copy [i] = argv[i + 1];
argv_copy[argc - 1] = NULL;
argv_copy [i] = argv[i + 1];
argv_copy[argc - 1] = NULL;
- if (!_dbus_spawn_async
(argv_copy
, &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);
}
{
fprintf (stderr, "Could not launch application: \"%s\"\n",
error.message);
}
-
+
+ dbus_free(argv_copy);
+
return 0;
}
return 0;
}