Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: non-interactive set -m



On Thu, 9 Jul 2009 18:13:15 +0000 (UTC)
Eric Blake <ebb9@xxxxxxx> wrote:
> It may be that all you need to do is add a check in the code that tries to
> manipulate the tty pgrp on completion of a monitored task to skip the
> manipulation if the shell is not interactive.  Here's my shot at that patch,
> which passed the above test case for me (module the bug that fg still didn't
> print anything to stdout), but I have no idea if it is doing the
> correct thing.

(This effectively disables attachtty() if non-interactive.)

It seems entirely reasonable not to try to take over the terminal if
you're in a shell that didn't think it was controlling the terminal in
the first place.  I'm not the job control expert, but since this doesn't
affect the usual case anyway I've committed it.

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



Messages sorted by: Reverse Date, Date, Thread, Author