zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: Odd job-reporting buglet (Re: Change in suspend behavior)
Date: Fri, 11 May 2001 15:52:57 +0000	[thread overview]
Message-ID: <1010511155257.ZM5424@candle.brasslantern.com> (raw)
In-Reply-To: <200105110847.KAA06216@beta.informatik.hu-berlin.de>

On May 11, 10:47am, Sven Wischnowsky wrote:
}
} Bart Schaefer wrote:
} 
} > schaefer[501] for i in bar foo; do cat & wait; done
} > [2] 27451
} > [2]  + suspended (tty input)  cat
} > [1] 27452
} > [1]  + suspended (tty input)  cat
} > zsh: suspended (tty input)  cat | 
} > zsh: running                for i in bar foo; do; cat & wait; done
} 
} The reason is pretty clear (to some): the sub-job returns and is
} stopped, so execpline() things it has to do all that super/sub-job
} handling it does when the sub-job was suspended with ^Z.

This happens only because of the `wait' command, right?  It does *not*
happen when I do `for i in bar foo; do; cat & sleep 5; done'.
 
} One way to try to fix this is to make execpline() check if the sub-job
} really was suspended because of a ^Z (SIGTSTP).

One can send TSTP with a `kill'.  Testing for TSTP has to be combined with
a test for whether the job is the foreground job at the time.

} The other way to try to fix this would be to check if the sub-job was
} ASYNC (i.e. it had a `&' at the end), pass that information up to (the
} right) execpline() and there decide to not wrap it into a super-job.

That sounds closer to the right thing to me, but wouldn't a test for "is
the foreground job" be equivalent (and possibly not need any more info
to be passed around)?

Or maybe it would be possible to know that we're in a `wait' command and
simply not do any of this processing?  But that would be equivalent to
"is this the foreground job" as well (as the `wait' would be the fore-
ground job in that case, not the job that got the signal).

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


  reply	other threads:[~2001-05-11 15:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20010510195228.018E6DCC4@mail.cise.ufl.edu>
     [not found] ` <010510153513.ZM24266@candle.brasslantern.com>
2001-05-11  4:21   ` Bart Schaefer
2001-05-11  8:47     ` Sven Wischnowsky
2001-05-11 15:52       ` Bart Schaefer [this message]
2001-05-14  8:50         ` 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=1010511155257.ZM5424@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=zsh-workers@sunsite.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).