[xdm PATCH 1/3] Don't remove the pid file from xdm child processes

Jeremy Huddleston jeremyhu at freedesktop.org
Tue Mar 23 13:18:48 PDT 2010


Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>

On Mar 23, 2010, at 11:40, Julien Cristau wrote:

> 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 <jcristau at debian.org>
> ---
> 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
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5820 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100323/a262cfa3/attachment.bin>


More information about the xorg-devel mailing list