Something doesn't feel right. db_kill_cmd finds a process, called p, then kills it. In your new diff calling sigexit, take note of the comment at the top:
* Force the current process to exit with the specified signal, dumping core current process? Doesn't look like it, it looks like it kills p. But then it calls exit1? Is this actually behaving the same for the db_kill_cmd() call?
