zsh-workers
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi <hzoli@ny.frontiercomm.net>
To: zsh-workers@math.gatech.edu (Zsh hacking and development)
Subject: Re: stopping "wait" in (sub)script ?
Date: Thu, 15 May 1997 11:47:16 -0400 (EDT)	[thread overview]
Message-ID: <199705151547.LAA00880@hzoli.home> (raw)
In-Reply-To: <970515035240.ZM381@candle.brasslantern.com> from Bart Schaefer at "May 15, 97 03:52:39 am"

> On May 15, 11:07am, Peter Stephenson wrote:
> } This doesn't seem to fix this particular bug here, it's still
> } uninterruptible.  On the other hand, replacing `cat ss` with $(<ss)
> } has always worked.  That doesn't leave much code in getoutput() to
> } make the difference.
> 
> I think the problem must be in signal_suspend().  The only difference
> between the two cases in getoutput() is that $(<ss) does an explicit
> child_unblock(), whereas `cat ss` does it implicitly via child_suspend(0).
> 
> If you go look at signal_suspend(), you'll find a lot of #ifdefs for the
> assorted signal handling variations.  I'll bet this problem is specific
> to one or more of those variations.

No.  The problem is that $(...) does not enter the new process to the
process table.  $(<...) does not fork, so it is not surprising that it
works.  The problem is that `cat ss` forks, and does an entersubsh after
the fork().  When a process terminates the SIGCHLD handler calls
update_job, which should reattach the terminal, but it does not do that
since the terminated job was not in the process table so update_job() is
not even called :-(.  I'll try to figure out a better solution tonight
(by that time it'll be tomorrow in Europe).

Zoltan


  reply	other threads:[~1997-05-15 16:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <33797750.316A@ptc.com>
1997-05-14  9:00 ` Peter Stephenson
1997-05-15  7:27   ` Zoltan Hidvegi
1997-05-15  9:07     ` Peter Stephenson
1997-05-15 10:52       ` Bart Schaefer
1997-05-15 15:47         ` Zoltan Hidvegi [this message]
1997-05-16  7:11           ` Zoltan Hidvegi

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=199705151547.LAA00880@hzoli.home \
    --to=hzoli@ny.frontiercomm.net \
    --cc=zsh-workers@math.gatech.edu \
    /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).