Re: [LIP] confusion about half-duplex pipes.

"Amit Limaye" <[email protected]>
Newsgroups gmane.user-groups.linux.india.programmers
Message-ID <[email protected]>
Shehjar u are confused about what fork does ? Read fork again perhaps tht
will answer a lot more questions tht u mite get for other things
Fork creates a copy of the existing process and does not share so closing a
file in the child or vice versa doesnt affect nething in the parent

Come to think abt it u must have read tht the parent gets a SIGCLD when the
child exits if the child/parent were to share address space the signal would
be delivered to both but it is only delivered to the parent


-SIGTERM
amit

----- Original Message -----
From: "Shehjar Tikoo" <shehjar_tikoo-/[email protected]>
To: <linux-india-programmers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Sent: Wednesday, November 12, 2003 1:18 PM
Subject: [LIP] confusion about half-duplex pipes.


> 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/
> _______________________________________________
> linux-india-programmers mailing list
> linux-india-programmers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/linux-india-programmers



-------------------------------------------------------
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.