in reply to Re^2: signal handling in exec()'d code
in thread signal handling in exec()'d code

The man page of setsid: "The calling process... has no controlling tty". Wouldn't that defeat a Ctrl-C signal getting through?

Replies are listed 'Best First'.
Re^4: signal handling in exec()'d code
by jliv (Initiate) on Jan 25, 2010 at 14:38 UTC

    I will try removing it and see what I get and let you guys know.

    This did cross my mind, but since I invoke setsid() right before the signal handler and since the signal handler works fine before exec(), I determined that setsid shouldn't affect what I am seeing. After exec(), the new process should inherit the same process space as the previous process, and since setsid() didn't prevent SIGINT from being caught in the initial process, I figured it shouldn't affect any subsequent exec()d processes. Am I mistaken here?