[ovs-dev] [PATCH] Make fatal signals cause an exit more promptly in special cases.

Ben Pfaff blp at nicira.com
Tue Apr 13 16:34:39 UTC 2010


On Tue, Apr 13, 2010 at 11:46:01AM -0400, Jesse Gross wrote:
> Thanks for tracking these down.  Looks good, just one comment:
> 
> 
> > +/* Check whether a fatal signal has occurred and, if so, call the fatal
> > signal
> > + * hooks and exit.
> > + *
> > + * This function is called automatically by poll_block(), but specialized
> > + * programs that may not always call poll_block() on a regular basis
> > should
> > + * also call it periodically.  (Therefore, any function with "block" in
> > its
> > + * name is a candidate to call fatal_signal_run(), because such functions
> > can
> > + * only used by specialize programs that can afford to block outside their
> > main
> > + * loop around poll_block().)
> > + */
> 
> Are these all the *_block functions?  Can we just say that any *_block
> function *must* call poll_block() (rather than is a candidate to call it)
> and that way we don't have to go digging through the code to verify it when
> we write one of these programs?

Sure.  I changed that sentence to:

   (Therefore, any function with "block" in its
 * name should call fatal_signal_run() each time it is called, either directly
 * or through poll_block(), because such functions can only used by specialized
 * programs that can afford to block outside their main loop around
 * poll_block().)

and pushed this out.




More information about the dev mailing list