detecting process termination in kernel?