lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


--- Dave Dodge <dododge@dododge.net> wrote:
> Of course just as with sockets, any application 
> making use of this bidirectionality will need
> to be redesigned if you want to run it on a system
> with the more traditional unidirectional pipes.
> 
I have a question. If I dup2() the stdin/stdout(as in
inetd/tcpserver) using one end of socketpair() and
execute the child, would that make it work even the
child is expecting pipe like fd as its stdin/stdout ?

If that is the case, would that be a better option
than pipe(), as it has bidirectional capability yet
can be used as unidirectional pipe ?

Another related issue, must I use shutdown() for
socket or just close(fd) would do the same thing ?



 
____________________________________________________________________________________
Food fight? Enjoy some healthy debate 
in the Yahoo! Answers Food & Drink Q&A.
http://answers.yahoo.com/dir/?link=list&sid=396545367