[quagga-dev 1363] Re: signal handling breaks gdb on NetBSD - fixed in CVS

Greg Troxel gdt at ir.bbn.com
Thu Jul 15 15:29:59 BST 2004


  Yep. That's why the global caught is cleared immediately compare and 
  not checked again.

  > so this could use comments.

That's what I meant - the ordering of the operations - test, then
clear and run, is critical, so that there is no chance of a signal
handler not getting run.  I'm probably being overly paranoid - I like
to explain why things are safe fo the code reviewer.

  hmmm.. Surely your script is broken?

Well, it kills the pids from the pidfiles, waits 2 seconds, and starts
all the daemons.  So given that the quagga formal interface spec
doesn't say how long it takes to shut down, this is indeed broken
since really it should wait for the pid files to go away, or until the
processes exit.

But, IMHO it's a reasonable expectation that shutdown at least
commence 'immediately' upen receipt of SIGTERM.

  But yes, I guess we could change it to run the non-signal-context 
  'signal handlers' on EINTR. We dont need any master flag in that case 
  btw, EINTR from select() should be enough to tell us a signal occured 
  ;)

Good point - that sounds like a good plan.



More information about the Quagga-dev mailing list