Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: that execution stuff
- X-seq: zsh-workers 6925
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: PATCH: that execution stuff
- Date: Tue, 29 Jun 1999 14:43:01 +0000
- In-reply-to: <199906291051.MAA23127@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <199906291051.MAA23127@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
On Jun 29, 12:51pm, Sven Wischnowsky wrote:
} Subject: Re: PATCH: that execution stuff
}
} However, there is still a problem (and this one isn't new, it was
} always like this): the sub-shell created on ^Z has the same pgrp as
} the parent shell and commands started by it use it, too. So if we
} have:
}
} % f() { less /etc/termcap; mutt }
} % f
}
} and then ^Z the less, fg it, and exit from it, the sub-shell takes
} over and starts mutt *in the pgrp of the parent shell*!
Oy.
} As I said, I
} don't have mutt, but this should then have the effect of stopping the
} parent shell again, right?
Yes.
} The solution would of course be to make the sub-shell use its own
} group
Specifically, the PID of the current job ...
} and have the parent shell correctly handle the
} attachtty()s. The patch tries to do that.
Here's "ps j" output (from another terminal while mutt is in foreground):
PPID PID PGID SID TTY TPGID STAT UID TIME COMMAND
18625 18626 18626 18626 p3 18631 S 674 0:00 Src/zsh -f
18626 18631 18631 18626 p3 18631 S 674 0:00 Src/zsh -f
18631 18632 18631 18626 p3 18631 S 674 0:00 mutt
Note, mutt is in its own pgrp, exactly as it wants to be. This is with
3.0.6-pre-5 after patches up to this one, but I don't know why it'd be
different in pws-24.
Thanks, Sven; this finally seems to have nailed the critical bits.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author