unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ulrich Mueller <ulm@gentoo.org>
To: "Juanma Barranquero" <lekktu@gmail.com>
Cc: Ulrich Mueller <ulm@gentoo.org>,
	Dan Nicolaescu <dann@ics.uci.edu>,
	emacs-devel@gnu.org, Nick Roberts <nickrob@snap.net.nz>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: bug in server-start
Date: Tue, 16 Dec 2008 12:49:32 +0100	[thread overview]
Message-ID: <18759.38348.81160.828820@a1i15.kph.uni-mainz.de> (raw)
In-Reply-To: <f7ccd24b0812160138i7d3e26d4tb1061ee7e41bc676@mail.gmail.com>

>>>>> On Tue, 16 Dec 2008, Juanma Barranquero wrote:

>> 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);

Ulrich




  reply	other threads:[~2008-12-16 11:49 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-15  9:00 bug in server-start Nick Roberts
2008-12-15 10:29 ` Juanma Barranquero
2008-12-15 10:50   ` Sven Joachim
2008-12-15 11:03     ` Juanma Barranquero
2008-12-15 11:04   ` Nick Roberts
2008-12-15 11:10     ` Juanma Barranquero
2008-12-15 11:26       ` Juanma Barranquero
2008-12-15 11:59         ` Juanma Barranquero
2008-12-15 15:25     ` Stefan Monnier
2008-12-15 17:24       ` Dan Nicolaescu
2008-12-15 18:27         ` Juanma Barranquero
2008-12-15 19:16           ` Romain Francoise
2008-12-15 20:00           ` Dan Nicolaescu
2008-12-16  7:03           ` Ulrich Mueller
2008-12-16  9:38             ` Juanma Barranquero
2008-12-16 11:49               ` Ulrich Mueller [this message]
2008-12-16 12:15                 ` Juanma Barranquero
2008-12-16 13:43                   ` Ulrich Mueller
2008-12-16 15:40                 ` Stefan Monnier
2008-12-16 16:01                   ` Ulrich Mueller
2008-12-16 16:01               ` Dan Nicolaescu
2008-12-16 16:07                 ` Juanma Barranquero
2008-12-16 16:15                   ` Dan Nicolaescu
2008-12-16 16:20                     ` Juanma Barranquero
2008-12-16 16:31                       ` Dan Nicolaescu
2008-12-16 16:42                         ` Juanma Barranquero
2008-12-16 17:00                           ` Dan Nicolaescu
2008-12-16 18:28                             ` Juanma Barranquero
2008-12-16 18:51                               ` Dan Nicolaescu
2008-12-16 19:00                                 ` Juanma Barranquero
2008-12-16 19:28                                   ` Dan Nicolaescu
2008-12-16 19:46                                     ` Juanma Barranquero
2008-12-16 19:58                                       ` Dan Nicolaescu
2008-12-16 20:33                                         ` Juanma Barranquero
2008-12-16 20:59                                           ` Dan Nicolaescu
2008-12-16 21:05                                             ` Juanma Barranquero
2008-12-16 20:56                           ` Chong Yidong
2008-12-16 21:12                             ` Juanma Barranquero
2008-12-16 23:44                   ` Stefan Monnier
2008-12-15 20:12         ` Stefan Monnier
2008-12-16 14:55           ` Dan Nicolaescu
2008-12-16 15:36             ` Stefan Monnier
2008-12-16 15:56               ` Dan Nicolaescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18759.38348.81160.828820@a1i15.kph.uni-mainz.de \
    --to=ulm@gentoo.org \
    --cc=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    --cc=lekktu@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    --cc=nickrob@snap.net.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).