Re: poll()-ing a pipe descriptor, watching for POLLHUP

2009-06-11 Thread Vlad Galu
On Wed, Jun 3, 2009 at 9:42 PM, Bruce Evans wrote: [...] Hello Bruce, Kostik, Oliver. Was any consensus reached on how to tackle this issue? The RELENG_7 code looks slightly different so I haven't (yet) tried adapting the provided patches. As for the interface behavior, I think the nicest way woul

Re: poll()-ing a pipe descriptor, watching for POLLHUP

2009-06-03 Thread Bruce Evans
On Wed, 3 Jun 2009, Kostik Belousov wrote: On Wed, Jun 03, 2009 at 05:30:51PM +0300, Kostik Belousov wrote: On Wed, Jun 03, 2009 at 04:10:34PM +0300, Vlad Galu wrote: Hm, I was having an issue with an internal piece of software, but never checked what kind of pipe caused the problem. Turns out

Re: poll()-ing a pipe descriptor, watching for POLLHUP

2009-06-03 Thread Kostik Belousov
On Wed, Jun 03, 2009 at 05:30:51PM +0300, Kostik Belousov wrote: > On Wed, Jun 03, 2009 at 04:10:34PM +0300, Vlad Galu wrote: > > Hm, I was having an issue with an internal piece of software, but > > never checked what kind of pipe caused the problem. Turns out it was a > > FIFO, and I got bitten b

Re: poll()-ing a pipe descriptor, watching for POLLHUP

2009-06-03 Thread Kostik Belousov
On Wed, Jun 03, 2009 at 04:10:34PM +0300, Vlad Galu wrote: > Hm, I was having an issue with an internal piece of software, but > never checked what kind of pipe caused the problem. Turns out it was a > FIFO, and I got bitten by the same bug described here: > http://lists.freebsd.org/pipermail/freeb

Re: poll()-ing a pipe descriptor, watching for POLLHUP

2009-06-03 Thread Vlad Galu
On Wed, Jun 3, 2009 at 3:35 PM, Vlad Galu wrote: > On Wed, Jun 3, 2009 at 3:32 PM, Kostik Belousov wrote: >> On Wed, Jun 03, 2009 at 03:15:32PM +0300, Vlad Galu wrote: >>> Hello, >>> >>> Please take a look at the attached code. Shouldn't poll() get a >>> POLLHUP event when the child process exits

Re: poll()-ing a pipe descriptor, watching for POLLHUP

2009-06-03 Thread Vlad Galu
On Wed, Jun 3, 2009 at 3:32 PM, Kostik Belousov wrote: > On Wed, Jun 03, 2009 at 03:15:32PM +0300, Vlad Galu wrote: >> Hello, >> >> Please take a look at the attached code. Shouldn't poll() get a >> POLLHUP event when the child process exits, closing the write end of >> the pipe? > > It seems that

Re: poll()-ing a pipe descriptor, watching for POLLHUP

2009-06-03 Thread Kostik Belousov
On Wed, Jun 03, 2009 at 03:15:32PM +0300, Vlad Galu wrote: > Hello, > > Please take a look at the attached code. Shouldn't poll() get a > POLLHUP event when the child process exits, closing the write end of > the pipe? It seems that you code forgot to close the write end of the pipe in parent. Th

Re: poll()-ing a pipe descriptor, watching for POLLHUP

2009-06-03 Thread Vlad Galu
Hm, according to the code at http://www.greenend.org.uk/rjk/2001/06/poll.html, it seems to work as expected (returning both POLLIN and POLLHUP), when closing the write end of the pipe from within the same process. On Wed, Jun 3, 2009 at 3:15 PM, Vlad Galu wrote: > Hello, > > Please take a look a

poll()-ing a pipe descriptor, watching for POLLHUP

2009-06-03 Thread Vlad Galu
Hello, Please take a look at the attached code. Shouldn't poll() get a POLLHUP event when the child process exits, closing the write end of the pipe? Thanks, Vlad poll.cpp Description: Binary data ___ freebsd-stable@freebsd.org mailing list http://lis