Commit b5bef9dc authored by Simon McVittie's avatar Simon McVittie
Browse files

Merge branch 'dbus-1.10' into dbus-1.10-ci

parents 727c5429 2fe59f18
......@@ -1354,6 +1354,26 @@ _dbus_spawn_async_with_babysitter (DBusBabysitter **sitter_p,
}
else if (grandchild_pid == 0)
{
#ifdef __linux__
int fd = -1;
#ifdef O_CLOEXEC
fd = open ("/proc/self/oom_score_adj", O_WRONLY | O_CLOEXEC);
#endif
if (fd < 0)
{
fd = open ("/proc/self/oom_score_adj", O_WRONLY);
_dbus_fd_set_close_on_exec (fd);
}
if (fd >= 0)
{
if (write (fd, "0", sizeof (char)) < 0)
_dbus_warn ("writing oom_score_adj error: %s\n", strerror (errno));
_dbus_close (fd, NULL);
}
#endif
/* Go back to ignoring SIGPIPE, since it's evil
*/
signal (SIGPIPE, SIG_IGN);
......
......@@ -526,7 +526,18 @@ test_processid (Fixture *f,
while (m == NULL)
test_main_context_iterate (f->ctx, TRUE);
if (dbus_message_get_args (m, &error,
if (dbus_set_error_from_message (&error, m))
{
g_assert_cmpstr (error.name, ==, DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN);
#ifdef PID_SHOULD_WORK
g_error ("Expected pid to be passed, but got %s: %s",
error.name, error.message);
#endif
dbus_error_free (&error);
}
else if (dbus_message_get_args (m, &error,
DBUS_TYPE_UINT32, &pid,
DBUS_TYPE_INVALID))
{
......@@ -545,14 +556,7 @@ test_processid (Fixture *f,
}
else
{
g_assert_cmpstr (error.name, ==, DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN);
#ifdef PID_SHOULD_WORK
g_error ("Expected pid to be passed, but got %s: %s",
error.name, error.message);
#endif
dbus_error_free (&error);
g_error ("Unexpected error: %s: %s", error.name, error.message);
}
}
......
......@@ -414,7 +414,7 @@ set_address_in_file (char *address, pid_t pid, Window wid)
"# If the DBUS_SESSION_BUS_ADDRESS environment variable is set, it will\n"
"# be used rather than this file.\n"
"# See \"man dbus-launch\" for more details.\n"
"DBUS_SESSION_BUS_ADDRESS=%s\n"
"DBUS_SESSION_BUS_ADDRESS='%s'\n"
"DBUS_SESSION_BUS_PID=%ld\n"
"DBUS_SESSION_BUS_WINDOWID=%ld\n",
get_machine_uuid (),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment