pass session ID to clear instead of session in SIGCHLD handler