potentially fix mutex lock error

it seems its somehow possible for handler_chld
to be invoked while it is being shutdown which causes
it to exit while still holding the lock for g_tchild_table.

in this change, the shutdown procedure keeps the desc lock
until after it sends the cancelation signal in an attempt
to prevent the sigchld thread from making it into
handler_chld before being canceled.