eventscript: don't do debugging system() from inside signal handler
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 8 Apr 2010 05:43:29 +0000 (15:13 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 8 Apr 2010 05:43:29 +0000 (15:13 +0930)
commite1b59b6a478cc2088f7a41dc492665d50607a2db
tree50d1f9e6401e9772947abf9cc66a8ef4dd3856c0
parent037dfbb8ad485de9954e4be891da2ace99674dd1
eventscript: don't do debugging system() from inside signal handler

In the case of a timeout, we dump a log of what's happening to a file
in /tmp.  We do it from the signal handler, which is an unreliable hack
(BZ58365).

Instead, create another (lower-priority) child to do the dump, then
kill the timedout script.

Note that this doesn't quite work as intended (the dump is often run
after the script has been killed), so the next patch resolves this.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 7ee5ecc8d53e78e2dec21197b74a74cc4ae1834c)
ctdb/common/ctdb_util.c
ctdb/include/ctdb_private.h
ctdb/server/eventscript.c