Well, just to push things a bit, I tried creating a shared object consisting of
#include <sys/types.h>
#Include <sys/socket.h>
int pipe(int *filedes)
{
return socketpair(AF_UNIX,SOCK_STREAM,0,filedes);
}
compiling it as
cc -c -K pic -G pipe_as_socket.c
ld -lsocket -lnsl -G -o pipe_as_socket.so pipe_as_socket.o
and LD_PRELOADing it; and it seemed to work for some trivial stuff
at the command line (in a subshell, so the shell itself would presumably
be using it, which seemed to be the case when comparing netstat -f unix
output before and during use from another window).
Which is far from a guarantee it would work for everything; I'd just about
expect that programs doing more exotic things than just read()/write()
with what they thought was the "usual" implementation of a pipe on
Solaris might be in for rude surprises while a file descriptor obtained from
such a pipe() substitute.
This message posted from opensolaris.org
_______________________________________________
perf-discuss mailing list
[email protected]