zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: zsh hangs sometimes continued.
Date: Fri, 01 Apr 2011 16:40:30 -0700	[thread overview]
Message-ID: <110401164030.ZM4003@torch.brasslantern.com> (raw)
In-Reply-To: <20110401214835.GA47239@redoubt.spodhuis.org>

On Apr 1,  5:48pm, Phil Pennock wrote:
} Subject: Re: zsh hangs sometimes continued.
}
} On 2011-04-01 at 07:18 -0700, Bart Schaefer wrote:
} > Reading the explanation left me wondering whether there's an additional
} > problem in the event that the shell is spawning processes fast enough
} > for the PID of a terminated-but-not-yet-reaped job to have been re-used
} > in a new still-running job?
} 
} Is this an April Fool's joke?  [suffering flu, can't tell]

No, I'm just using the word "reaped" too loosely.

My thought was that a job in pipeline or the like might still have a
slot in *zsh's* job table (if the rest of the pipeline had not exited)
even though the corresponding process was already gone (and had been
waited-for in the SIGCHLD handler).  Hence zsh could end up thinking
it needed to do a synchronous wait for the old job which, if the pid
was never re-used, would immediately fail, but if the pid was reused
would instead hang while the new one with the same pid was still
running (and then maybe fail to mark the newer one as done in its
actual job slot).

On further reflection, though, either this must already have been
impossible, or the test in PWS's patch would cover it as well.


      reply	other threads:[~2011-04-01 23:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1301593035.6016.ezmlm@zsh.org>
2011-03-31 18:32 ` VAN VLIERBERGHE Stef
2011-04-01  9:28   ` Peter Stephenson
2011-04-01 14:18     ` Bart Schaefer
2011-04-01 21:33       ` VAN VLIERBERGHE Stef
2011-04-01 21:48       ` Phil Pennock
2011-04-01 23:40         ` Bart Schaefer [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

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

  git send-email \
    --in-reply-to=110401164030.ZM4003@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /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.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).