zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH (and another bug report): Re: zsh script and SIGCONT
Date: Mon, 13 Dec 1999 12:00:01 +0100 (MET)	[thread overview]
Message-ID: <199912131100.MAA23892@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Sun, 12 Dec 1999 20:07:59 +0000


Bart Schaefer wrote:

> ...
> 
> Even worse than this ... if you read the script with ". p2", then ^Z only
> stops the "sleep 1" and the loop keeps going.  All three cases ought to
> behave the same as executing the loop at the top-level prompt.
> 
> I spent a while trying to trace through this, but it's nearly impossible
> to use a debugger in combination with tty stop signals, and zsh's job
> control is one of those places where "reading zsh source code makes you
> go blind," as Tom Christiansen has said.

Yes, real fun, isn't it... sigh.

> I believe the script case has something to do with both zsh and sleep
> getting the TSTP (which zsh doesn't have a special handler for); zsh forks
> to background the entire while loop, and therefore the parent shell exits
> from the loop -- but so does the forked child, for reasons that I can't
> follow.
> 
> However, in the case of a script, zsh doesn't need to do any of this; the
> script can start and stop as its own process.

Sounds reasonable.

>  So the following appears
> to fix the script case, but I still don't know what's going on with ".".

In line 725/726 in exec.c we explicitly turn the list_pipe handling
off if we are sourcing. Removing these two lines makes it work in the
way you (and I) expect it. However, this is an explicit test and since 
I don't have any idea why we did that, I won't produce a patch for it
now. Mainly because I don't think I'll have the time today to find out
why we added this test... if anyone has the time to look in the
archive...

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


         reply	other threads:[~1999-12-13 11:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Liam.944999422.929800.796.1038708749@fizz>
1999-12-12 20:07 ` Bart Schaefer
1999-12-13 10:25   ` Zefram
1999-12-13 11:00     ` Sven Wischnowsky [this message]
1999-12-13 17:42       ` Bart Schaefer
1999-12-14  9:13 Sven Wischnowsky
1999-12-15 17:30 ` Bart Schaefer
1999-12-14 13:21 Sven Wischnowsky

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=199912131100.MAA23892@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).