From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20536 invoked from network); 3 May 2000 13:38:01 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 May 2000 13:38:01 -0000 Received: (qmail 4721 invoked by alias); 3 May 2000 13:37:16 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11120 Received: (qmail 4554 invoked from network); 3 May 2000 13:37:01 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer goliath.siemens.de) From: "Andrej Borsenkow" To: "ZSH workers mailing list" Subject: zpty and controlling tty (and other fd's) Date: Wed, 3 May 2000 17:36:44 +0400 Message-ID: <000b01bfb504$9f561a20$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 Should not we reset controlling tty for external command as well? Else, I'm afraid, commands that directly open /dev/tty may have problems with it. Currently it looks a bit funny: bor@itsrm2% ps -ft pts/6 UID PID PPID C STIME TTY TIME CMD bor 19935 19370 0 17:30:44 pts/6 0:00 nslookup bor 19370 19368 0 16:59:27 pts/6 0:03 /tools/bin/zsh but bor@itsrm2% lsof -c nslookup COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME nslookup 19935 bor cwd VDIR 4,5 3072 125 /home/bor nslookup 19935 bor txt VREG 4,3 69961 46376 /usr/sbin/nslookup nslookup 19935 bor txt VREG 4,3 715161 23840 /usr/lib/libc.so.1 nslookup 19935 bor txt VREG 4,3 320397 23882 /usr/lib/libresolv.so nslookup 19935 bor txt VREG 4,3 192333 23859 /usr/lib/libsocket.so nslookup 19935 bor txt VREG 4,3 592617 26181 /usr/lib/libnsl.so nslookup 19935 bor 0u VCHR 112,8 0t66 4202 STR:/dev/pts/8->pts nslookup 19935 bor 1u VCHR 112,8 0t66 4202 STR:/dev/pts/8->pts nslookup 19935 bor 2u VCHR 112,8 0t66 4202 STR:/dev/pts/8->pts nslookup 19935 bor 3u VCHR 111,8 0t69 STR:/dev/ptmx->ptm nslookup 19935 bor 10u VCHR 112,6 0t1231 4200 STR:/dev/pts/6->pts nslookup 19935 bor 11u VCHR 112,6 0t1715 4200 STR:/dev/pts/6->pts nslookup 19935 bor 13r VREG 4,5 1303088 24153 /home/bor/.zsh.d/std-3.1.7-pre-2.zwc Oh, yes, and why nslookup has fd's 10 and 11 open at all? -andrej Have a nice DOS! B >>