zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: unable to wait on completed job [was: should $! give the pid of subshell?]
Date: Mon, 30 Nov 2009 18:57:20 -0800	[thread overview]
Message-ID: <091130185720.ZM3782@torch.brasslantern.com> (raw)
In-Reply-To: <20091130183707.4f8ea36e@news01>

On Nov 30,  6:37pm, Peter Stephenson wrote:
}
} If it's only an issue for $! (lastpid internally), I think it's fairly
} straightforward to fix. I tried to make it work even if a new process
} with the same PID came along later.

This looks reasonable, but I wonder if we should make it conditional
on POSIX_JOBS ?

} No idea about anything to do with SIGTTOU, however, that's outside my
} range.

SIGTTOU is only a side-effect.  The doc for POSIX_JOBS says:

    ... When the option is set, the MONITOR option and job control
    remain active in the subshell ... 

What's happening is that the subshell is not the tty process group
leader, so when MONITOR tries to print the job number and PID (and
later the exit status), the TTY driver stops it because it doesn't
appear to be the foreground job.

What's odder is that "stty -tostop" doesn't prevent this.  Something is
effectively reasserting that setting before the subshell gets going.


  reply	other threads:[~2009-12-01  3:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <19213.26295.345572.732238@gargle.gargle.HOWL>
     [not found] ` <200911251748.nAPHmrCX010198@news01.csr.com>
     [not found]   ` <m3638sr72x.fsf_-_@klanderman.net>
     [not found]     ` <091129211436.ZM1769@torch.brasslantern.com>
2009-11-30 18:37       ` Peter Stephenson
2009-12-01  2:57         ` Bart Schaefer [this message]
2009-12-01  9:52           ` Peter Stephenson
2009-12-02  9:53             ` Peter Stephenson

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=091130185720.ZM3782@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).