zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: that execution stuff
Date: Tue, 29 Jun 1999 14:43:01 +0000	[thread overview]
Message-ID: <990629144301.ZM20707@candle.brasslantern.com> (raw)
In-Reply-To: <199906291051.MAA23127@beta.informatik.hu-berlin.de>

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


  parent reply	other threads:[~1999-06-29 14:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-29 10:51 Sven Wischnowsky
1999-06-29 11:58 ` Andrej Borsenkow
1999-06-29 14:43 ` Bart Schaefer [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-06-30 10:34 Sven Wischnowsky
1999-06-30  9:56 Sven Wischnowsky
1999-06-29 12:07 Sven Wischnowsky
1999-06-29  6:56 Sven Wischnowsky
1999-06-29  7:34 ` Bart Schaefer
1999-06-29 10:27 ` Andrej Borsenkow

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=990629144301.ZM20707@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --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).