Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: PATCH: Re: zpty and controlling tty (and other fd's)
- X-seq: zsh-workers 11217
- From: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: "Sven Wischnowsky" <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>, <zsh-workers@xxxxxxxxxxxxxx>
- Subject: RE: PATCH: Re: zpty and controlling tty (and other fd's)
- Date: Fri, 5 May 2000 20:57:34 +0400
- Importance: Normal
- In-reply-to: <200005041333.PAA02841@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
> >
> > Note fd's 3 and 13. 3 is master side of pty (child does not need it,
> > does it?)
>
> Of course I tried to close it -- and on Linux this messed up the
> parent's (i.e. the shell's) terminal settings. Don't know how this
> came.
>
Well, at least Midnight and Screen do it - so, it is possible. This one
is from Midnight code that spawns subshell. I do not know, how usefulr
it is.
/* {{{ Open the slave side of the pty: again */
pty_slave = pty_open_slave (pty_name);
/* This must be done before closing the master side of the pty,
*/
/* or it will fail on certain idiotic systems, such as Solaris.
*/
/* Close master side of pty. This is important; apart from
*/
/* freeing up the descriptor for use in the subshell, it also
*/
/* means that when MC exits, the subshell will get a SIGHUP and
*/
/* exit too, because there will be no more descriptors pointing
*/
/* at the master side of the pty and so it will disappear.
*/
close (subshell_pty);
I do not use Linux, but until this is cleared there - porbably under
#ifndef __LINUX (or whatever)?
-andrej
Messages sorted by:
Reverse Date,
Date,
Thread,
Author