summaryrefslogtreecommitdiff
path: root/dbus/dbus-spawn.c
diff options
context:
space:
mode:
Diffstat (limited to 'dbus/dbus-spawn.c')
-rw-r--r--dbus/dbus-spawn.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/dbus/dbus-spawn.c b/dbus/dbus-spawn.c
index 6e42f554..8965b587 100644
--- a/dbus/dbus-spawn.c
+++ b/dbus/dbus-spawn.c
@@ -939,7 +939,7 @@ do_exec (int child_err_report_fd,
DBusSpawnChildSetupFunc child_setup,
void *user_data)
{
-#ifdef DBUS_BUILD_TESTS
+#ifdef DBUS_ENABLE_EMBEDDED_TESTS
int i, max_open;
#endif
@@ -950,7 +950,7 @@ do_exec (int child_err_report_fd,
if (child_setup)
(* child_setup) (user_data);
-#ifdef DBUS_BUILD_TESTS
+#ifdef DBUS_ENABLE_EMBEDDED_TESTS
max_open = sysconf (_SC_OPEN_MAX);
for (i = 3; i < max_open; i++)
@@ -1259,7 +1259,11 @@ _dbus_spawn_async_with_babysitter (DBusBabysitter **sitter_p,
_dbus_assert_not_reached ("Got to code after write_err_and_exit()");
}
else if (grandchild_pid == 0)
- {
+ {
+ /* Go back to ignoring SIGPIPE, since it's evil
+ */
+ signal (SIGPIPE, SIG_IGN);
+
do_exec (child_err_report_pipe[WRITE_END],
argv,
env,
@@ -1324,7 +1328,7 @@ _dbus_babysitter_set_result_function (DBusBabysitter *sitter,
/** @} */
-#ifdef DBUS_BUILD_TESTS
+#ifdef DBUS_ENABLE_EMBEDDED_TESTS
static char *
get_test_exec (const char *exe,