unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 9488@debbugs.gnu.org, hanche@math.ntnu.no, 12980@debbugs.gnu.org
Subject: bug#12980: 24.3.50; Zombie process left after call-process
Date: Thu, 29 Nov 2012 12:28:24 -0800	[thread overview]
Message-ID: <50B7C568.7040108@cs.ucla.edu> (raw)
In-Reply-To: <83pq2wuvy0.fsf@gnu.org>

On 11/29/12 10:04, Eli Zaretskii wrote:

>> +      /* CHILD must be a child process that has not been reaped, and
>> +         STATUS and OPTIONS must be valid.  */
>> +      eassert (errno == EINTR);
> 
> Are we sure that either CHILD will have exited at this point, or else
> OPTIONS won't include WNOHANG?

It's unlikely that CHILD will have exited at this point.  That can
happen only if CHILD exited after the immediately-preceding waitpid
call and before this eassert.  In such a case, CHILD has exited but
has not been reaped.

It's common for OPTIONS to not include WNOHANG (wait_for_termination
does this), and when that happens it's almost always the case that
CHILD has not exited at this point.

> Can this function be ever called if
> neither of these conditions is true?

By "this function" I assume you mean get_child_status.  Yes, it's
quite common.  For example, Fcall_process invokes wait_for_termination,
and it's common for wait_for_termination to invoke get_child_status
before CHILD has exited, and without WNOHANG in OPTIONS.





      reply	other threads:[~2012-11-29 20:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-24  9:34 bug#12980: 24.3.50; Zombie process left after call-process Harald Hanche-Olsen
2012-11-26 22:38 ` Paul Eggert
2012-11-27 16:00   ` Eli Zaretskii
2012-11-29  2:30     ` Paul Eggert
2012-11-29 18:04       ` Eli Zaretskii
2012-11-29 20:28         ` Paul Eggert [this message]

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=50B7C568.7040108@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=12980@debbugs.gnu.org \
    --cc=9488@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=hanche@math.ntnu.no \
    /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).