Howdy Folks,
First time post so go easy!
Has anyone experienced signal blocking problems with the exec() command?
I'm testing exec() with the vmstat command on HP-UX unix. The same problem is occuring on Linux flavors (Red-hat and Suse) but I'm testing now on HP-UX.
If i run vmstat from the command line and follow it with a trace all works Ok. I pass it a SIGUSR1, it doesn't recognise it and bombs out.
Now if i call vmstat using the exec() function (i'm implementing a WebUI) and then pass it the SIGUSR1 from the command line, the signal never reaches the command, as outputted by the trace.
Why is this signal getting blocked? I've tried the same with the SIGALRM and that gets through.
Any ideas?
Many Thanks,
Ray
[SOLVED] Signal Blocking by the exec() command
Moderator: General Moderators
perhaps php simply ignores SIGUSR1. I'm not quite sure, maybe setting SIGUSR1 to SIG_DFL in the new process may solve your issue.exec(2) wrote: Signals set to the default action (SIG_DFL) in the calling
process image are set to the default action in the new pro-
cess image (see signal(3C)). Signals set to be ignored
(SIG_IGN) by the calling process image are set to be ignored
by the new process image. Signals set to be caught by the
calling process image are set to the default action in the
new process image (see signal(3HEAD)). After a successful
call to any of the exec functions, alternate signal stacks
are not preserved and the SA_ONSTACK flag is cleared for all
signals.