From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26690 invoked from network); 17 Mar 2004 13:57:36 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 17 Mar 2004 13:57:36 -0000 Received: (qmail 12795 invoked by alias); 17 Mar 2004 13:57:27 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19651 Received: (qmail 12775 invoked from network); 17 Mar 2004 13:57:26 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 17 Mar 2004 13:57:26 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.189.58.19] by sunsite.dk (MessageWall 1.0.8) with SMTP; 17 Mar 2004 13:57:26 -0000 Received: from MAILSWEEPER01.csr.com (mailhost1.csr.com [62.189.183.235]) by lhuumrelay3.lnd.ops.eu.uu.net (8.11.0/8.11.0) with ESMTP id i2HDvPv01683 for ; Wed, 17 Mar 2004 13:57:25 GMT Received: from EXCHANGE02.csr.com (unverified [192.168.137.45]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Wed, 17 Mar 2004 13:57:03 +0000 Received: from csr.com ([192.168.144.127]) by EXCHANGE02.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 17 Mar 2004 13:59:40 +0000 To: Zsh workers Subject: Re: zpty In-reply-to: "Oliver Kiddle"'s message of "Wed, 17 Mar 2004 13:58:35 +0100." <12085.1079528315@trentino.logica.co.uk> Date: Wed, 17 Mar 2004 13:57:24 +0000 Message-ID: <5310.1079531844@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 17 Mar 2004 13:59:40.0824 (UTC) FILETIME=[17A6A980:01C40C28] Oliver Kiddle wrote: > Anyway, try running this: > zpty test cat > zpty -L > ^C > > Why does zpty -L need to call checkptycmd()? Is that to see if the > process is still alive? It tries to read one character which blocks. Yes, I imagine so. This is useless. It needs to use non-blocking I/O, otherwise it shouldn't even bother with the test --- hanging up is not acceptable, even if the information returned is a little out of date. So I think removing checkptycmd() for now ought to be an improvement (haven't actually tried). read_poll() would be an improvement, but care is needed --- the device is a terminal and while there is some handling for that (i) it was tricky and I nearly blew a gasket getting it to work on the systems I tried, so we may be back in system-specific land (ii) currently it assumes the terminal in use is the shell terminal, which isn't the case here. (In particulay, using select() and poll() on terminals didn't always seemed to work, I had to use termios.) -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************