Re: Bug with signal delivery after fork.

2008-01-18 Thread Marc Lehmann
> > You have to start your watcher before looping, otherwise it does return when > > no other watchers are active. > > *sigh* > > But since I may not _want_ to start watch signals in the child until much > later, I don't have a watcher I want to start, unless I make one up When you have no watch

Re: Bug with signal delivery after fork.

2008-01-16 Thread Chris Shoemaker
On Wed, Jan 16, 2008 at 03:48:52AM +0100, Marc Lehmann wrote: > On Tue, Jan 15, 2008 at 12:54:59PM -0500, Chris Shoemaker <[EMAIL PROTECTED]> > wrote: > > I've narrowed this down considerably by tracing both good and bad > > executions and comparing. I'll comment the differences in the code: > >

Re: Bug with signal delivery after fork.

2008-01-15 Thread Marc Lehmann
On Tue, Jan 15, 2008 at 12:54:59PM -0500, Chris Shoemaker <[EMAIL PROTECTED]> wrote: > I've narrowed this down considerably by tracing both good and bad > executions and comparing. I'll comment the differences in the code: Your test program is still buggy: > ev_default_fork(); > ev_loop

Re: Bug with signal delivery after fork.

2008-01-15 Thread Chris Shoemaker
On Tue, Jan 15, 2008 at 10:50:34AM -0500, Chris Shoemaker wrote: > On Tue, Jan 15, 2008 at 05:06:27AM +0100, Marc Lehmann wrote: > > On Mon, Jan 14, 2008 at 10:56:54AM -0500, Chris Shoemaker <[EMAIL > > PROTECTED]> wrote: > > > I believe the attached program demonstrates some bug related to si

Re: Bug with signal delivery after fork.

2008-01-15 Thread Chris Shoemaker
On Tue, Jan 15, 2008 at 05:06:27AM +0100, Marc Lehmann wrote: > On Mon, Jan 14, 2008 at 10:56:54AM -0500, Chris Shoemaker <[EMAIL PROTECTED]> > wrote: > > I believe the attached program demonstrates some bug related to signal > > delivery after a fork. > > Oh, what you see is that ev_default_

Re: Bug with signal delivery after fork.

2008-01-14 Thread Marc Lehmann
On Mon, Jan 14, 2008 at 10:56:54AM -0500, Chris Shoemaker <[EMAIL PROTECTED]> wrote: > I believe the attached program demonstrates some bug related to signal > delivery after a fork. Oh, what you see is that ev_default_fork only sets a flag for the next run of ev_loop. You will have to run ev

Re: Bug with signal delivery after fork.

2008-01-14 Thread Marc Lehmann
On Mon, Jan 14, 2008 at 10:56:54AM -0500, Chris Shoemaker <[EMAIL PROTECTED]> wrote: > Hi, > I believe the attached program demonstrates some bug related to signal > delivery after a fork. Thanks for the test program, I will have a look asap. -- The choice of a Deliant

Bug with signal delivery after fork.

2008-01-14 Thread Chris Shoemaker
Hi, I believe the attached program demonstrates some bug related to signal delivery after a fork. I expect the child to receive the HUP signal, run the signal_cb, and exit. Notice the locking that ensures that the ev_signal is started before any signal is sent. This program behaves as I expec