From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3273 invoked from network); 3 Mar 2000 14:29:31 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 Mar 2000 14:29:31 -0000 Received: (qmail 27964 invoked by alias); 3 Mar 2000 14:29:10 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9979 Received: (qmail 27951 invoked from network); 3 Mar 2000 14:29:09 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "ZSH workers mailing list" Subject: Questions about zpty module. Date: Fri, 3 Mar 2000 17:28:58 +0300 Message-ID: <000601bf851c$cff2af30$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.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 - does zsh reads pty output line by line? Or does it just reads what happens to be in buffer? How is it related to blocking/non-blocking modes? - manual says: The -r option can be used to read the output of the command NAME. Without a PARAM argument, the string read will be printed to standard output. With a PARAM argument, the string read will be put in the parameter named PARAM. If the PATTERN is also given, output will be read until the whole string read matches the PATTERN. what is exactly mentioned "string" that is matched against PATTERN? Is it the whole input? That is, in case zpty -r command var '*\n' will zsh wait until it reads the whole line? What happens in case of non-blocking read then? In this case read can return with only part of input. - is it possible to know, if write was successful (or how many characters were actually written)? In case of non-blocking fd and full pipe write() can return with only partial buffer (or none at all) written - what about read/write with timeout? It can avoid problems with non-blocking mode while providing safe way to detect external program failure. /andrej