wait for deamon pid after SIGTERM to prevent it from becoming zombie