[ksh93-integration-discuss] Re: [perf-discuss] Can |recv()| be used on a pipe in Solaris ?
Glenn Fowler
gsf at research.att.com
Tue Sep 5 15:11:20 PDT 2006
On Tue, 05 Sep 2006 14:46:46 -0700 Alexander Kolbasov wrote:
> The recv(), recvfrom(), and recvmsg() functions are used to
> receive messages from another socket. The s socket is
> created with socket(3SOCKET).
> The pipe is not a socket in Solaris.
thanks
but that doesn't answer the question "does recv() work on pipes in solaris?"
there are some systems with pipe!=socket with similar documentation
for which recv() works on pipes
for solaris ioctl(I_PEEK) works on pipes, and the libast iffe scripts
prefer I_PEEK, so recv() behavior doesn't matter (on solaris)
a general note: this is a big hole in the official and de-facto standards
there is no consistent (across implementations) way to peek on a pipe, and
thus no efficient way to read exactly one line from a pipe -- what is
needed is a call that peeks on any fd open for reading
-- Glenn Fowler -- AT&T Research, Florham Park NJ --
More information about the ksh93-integration-discuss
mailing list