09-23-04 02:22 AM
On Sun, 19 Sep 2004, cherico wrote:
> IIRC, stdio is full buffered and pseudo-terminal is line-buffered.
It's not that simple. It depends which I/O stream you're talking
about, and what it's connected to.
> When a process calls pty_fork() to spawn a child process, they
> communicate through line-buffered pseudo-terminal and both the stdio
> descriptors of the child process are associated with the pty.
Which version of pty_fork? It's not a standard function.
> If stdio is full-buffered, does the pty's line-buffered policy help
> with deadlocks?
>
> full-buffered stdio + line-buffered pty = full-buffered foo?
There's some discussion of this in my book, Solaris Systems
Programming. But yes, a pty can be used to avoid deadlock
between coprocesses that use standard I/O.
HTH,
--
Rich Teer, SCNA, SCSA, author of "Solaris Systems Programming",
published in August 2004.
President,
Rite Online Inc.
Voice: +1 (250) 979-1638
URL: http://www.rite-group.com/rich
[ Post a follow-up to this message ]
|