dbus/dbus dbus-sysdeps-util.c,1.2,1.3
Havoc Pennington
hp at freedesktop.org
Sun May 8 08:41:41 PDT 2005
Update of /cvs/dbus/dbus/dbus
In directory gabe:/tmp/cvs-serv8711/dbus
Modified Files:
dbus-sysdeps-util.c
Log Message:
2005-05-08 Havoc Pennington <hp at redhat.com>
* dbus/dbus-sysdeps-util.c (_dbus_become_daemon): write the
daemon's pid, not the parent's pid, to the file descriptor.
Reported by Taj Morton.
Index: dbus-sysdeps-util.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-sysdeps-util.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- dbus-sysdeps-util.c 5 Mar 2005 18:38:54 -0000 1.2
+++ dbus-sysdeps-util.c 8 May 2005 15:41:39 -0000 1.3
@@ -56,7 +56,7 @@
* Does the chdir, fork, setsid, etc. to become a daemon process.
*
* @param pidfile #NULL, or pidfile to create
- * @param print_pid_fd file descriptor to print pid to, or -1 for none
+ * @param print_pid_fd file descriptor to print daemon's pid to, or -1 for none
* @param error return location for errors
* @returns #FALSE on failure
*/
@@ -142,7 +142,7 @@
return FALSE;
}
- if (!_dbus_string_append_int (&pid, _dbus_getpid ()) ||
+ if (!_dbus_string_append_int (&pid, child_pid) ||
!_dbus_string_append (&pid, "\n"))
{
_dbus_string_free (&pid);
More information about the dbus-commit
mailing list