From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8794 invoked from network); 5 May 2000 16:58:08 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 5 May 2000 16:58:08 -0000 Received: (qmail 23407 invoked by alias); 5 May 2000 16:58:00 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11217 Received: (qmail 23393 invoked from network); 5 May 2000 16:57:59 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "Sven Wischnowsky" , Subject: RE: PATCH: Re: zpty and controlling tty (and other fd's) Date: Fri, 5 May 2000 20:57:34 +0400 Message-ID: <002601bfb6b3$025c5530$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 In-Reply-To: <200005041333.PAA02841@beta.informatik.hu-berlin.de> > > > > 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