emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in server-start


From: Stefan Monnier
Subject: Re: bug in server-start
Date: Tue, 16 Dec 2008 10:40:10 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>>> Exit with an error, please. And if possible, the parent process should
>>> return a nonzero exit status. (AFAICS, not calling daemon-initialized
>>> should be sufficient for this, but I haven't tested it.)
> It turns out that I should have tested this ...
>> Please, try the attached patch.
> Looks good, except for the exit status of the parent which is zero.
> The following will test for one character to be read from the pipe
> (which is sent when daemon-initialized is called):

> --- src/emacs.c
> +++ src/emacs.c
> @@ -1124,7 +1124,7 @@
>           }
>         while (retval == -1 && errno == EINTR);
 
> -       if (retval < 0)
> +       if (retval <= 0)
>           {
>             fprintf (stderr, "Error reading status from child\n");
>             exit (1);

Indeed, we should return a non-zero status, but this patch ends up with
this undesirable "Error reading status from child" message, so we want
something better.


        Stefan






reply via email to

[Prev in Thread] Current Thread [Next in Thread]