The parent xdm process registers RemovePid with atexit(), which means that any child exit would trigger the (wrong) removal of the pidfile. So in RemovePid, don't do anything if we're not the parent xdm process.
Signed-off-by: Julien Cristau <[email protected]> --- dm.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dm.c b/dm.c index 55fb24e..da18800 100644 --- a/dm.c +++ b/dm.c @@ -969,6 +969,9 @@ StorePid (void) static void RemovePid (void) { + if (parent_pid != getpid()) + return; + Debug ("unlinking process ID file %s\n", pidFile); if (unlink (pidFile)) if (errno != ENOENT) -- 1.7.0 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
