int i;
DBusString uuid;
dbus_bool_t retval;
+ sigset_t new_set, old_set;
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
retval = FALSE;
_DBUS_SET_OOM (error);
return FALSE;
}
+
+ /* We need to block any existing handlers for SIGCHLD temporarily; they
+ * will cause waitpid() below to fail.
+ * https://bugs.freedesktop.org/show_bug.cgi?id=21347
+ */
+ sigemptyset (&new_set);
+ sigaddset (&new_set, SIGCHLD);
+ sigprocmask (SIG_BLOCK, &new_set, &old_set);
if (!_dbus_get_local_machine_uuid_encoded (&uuid))
{
for (i = 3; i < maxfds; i++)
close (i);
+ sigprocmask(SIG_SETMASK, &old_set, NULL);
+
execv (DBUS_BINDIR "/dbus-launch", argv);
/* failed, try searching PATH */
retval = TRUE;
out:
+ sigprocmask (SIG_SETMASK, &old_set, NULL);
+
if (retval)
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
else