[LIP] confusion about half-duplex pipes.

Shehjar Tikoo <shehjar_tikoo-/[email protected]>
Newsgroups gmane.user-groups.linux.india.programmers
Message-ID <[email protected]>
Hi all.
I'd be grateful if somebody solved this confusion I
have about IPC using half-duplex pipes.Read on for
where I am getting stuck.

A parent forks a child after creating a pipe using the
pipe function.
In the situation where child wants to read and parent
wants to write to 
the pipe, the child closes the fd[1] file descriptor
and parent closes the fd[0] file descriptor, since
these are not needed by them.What I 
want to know is that, since the parent and child are
working on the same address space, should'nt the
closing of both of those file 
descriptors( though in separate processes..) close the
pipe.Leaving no file descriptor for reading and
writing open.

I know I am wrong here coz this is not what happens, I
am counting on some of you to correct me and explain
what really goes on here.

Thanks.
Shehjar



__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree


-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.