From 163555c7ab56132ee27e3e7d9a26eb985682c1b5 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Fri, 17 Aug 2007 16:43:57 +0000 Subject: 2007-08-17 Havoc Pennington * tools/dbus-launch-x11.c (set_address_in_x11): fix from Michael Lorenz to use long not int with XChangeProperty format 32 * dbus/dbus-sysdeps-util-unix.c (_dbus_write_pid_to_file_and_pipe): factor this out, and use the same code in _dbus_become_daemon (where the parent writes the pid file and to the pid pipe) and in bus_context_new (where the daemon writes its own pid file and to its own pid pipe) * bus/bus.c (bus_context_new): close the pid pipe after we print to it. Also, don't write the pid to the pipe twice when we fork, someone reported this bug a long time ago. --- dbus/dbus-sysdeps.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'dbus/dbus-sysdeps.h') diff --git a/dbus/dbus-sysdeps.h b/dbus/dbus-sysdeps.h index ab1631b8..eadfb433 100644 --- a/dbus/dbus-sysdeps.h +++ b/dbus/dbus-sysdeps.h @@ -363,13 +363,16 @@ void _dbus_print_backtrace (void); dbus_bool_t _dbus_become_daemon (const DBusString *pidfile, DBusPipe *print_pid_pipe, DBusError *error); -dbus_bool_t _dbus_write_pid_file (const DBusString *filename, - unsigned long pid, - DBusError *error); + dbus_bool_t _dbus_verify_daemon_user (const char *user); dbus_bool_t _dbus_change_to_daemon_user (const char *user, DBusError *error); +dbus_bool_t _dbus_write_pid_to_file_and_pipe (const DBusString *pidfile, + DBusPipe *print_pid_pipe, + dbus_pid_t pid_to_write, + DBusError *error); + /** A UNIX signal handler */ typedef void (* DBusSignalHandler) (int sig); -- cgit