<div class="gmail_quote">On Mon, Apr 12, 2010 at 5:47 PM, Ben Pfaff <span dir="ltr">&lt;<a href="mailto:blp@nicira.com">blp@nicira.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
The fatal-signal library notices and records fatal signals (e.g. SIGTERM)<br>
and terminates the process on the next trip through poll_block().  But<br>
some special utilities do not always invoke poll_block() promptly, e.g.<br>
&quot;ovs-ofctl monitor&quot; does not call poll_block() as long as OpenFlow messages<br>
are available.  But these special cases seem like they are all likely to<br>
call into functions that themselves block (those with &quot;_block&quot; in their<br>
names).  So make a new rule that such functions should always call<br>
fatal_signal_run(), either directly or through poll_block().  This commit<br>
implements and documents that rule.<br></blockquote><div><br></div><div>Thanks for tracking these down.  Looks good, just one comment:</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

+/* Check whether a fatal signal has occurred and, if so, call the fatal signal<br>
+ * hooks and exit.<br>
+ *<br>
+ * This function is called automatically by poll_block(), but specialized<br>
+ * programs that may not always call poll_block() on a regular basis should<br>
+ * also call it periodically.  (Therefore, any function with &quot;block&quot; in its<br>
+ * name is a candidate to call fatal_signal_run(), because such functions can<br>
+ * only used by specialize programs that can afford to block outside their main<br>
+ * loop around poll_block().)<br>
+ */<br></blockquote><div><br></div><div>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&#39;t have to go digging through the code to verify it when we write one of these programs?</div>
</div>