zsh-workers
 help / color / mirror / code / Atom feed
* Questions about zpty module.
@ 2000-03-03 14:28 Andrej Borsenkow
  2000-03-04  6:19 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Andrej Borsenkow @ 2000-03-03 14:28 UTC (permalink / raw)
  To: ZSH workers mailing list

- 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-03-04  6:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-03 14:28 Questions about zpty module Andrej Borsenkow
2000-03-04  6:19 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).