Home > Archive > Unix Programming > July 2006 > does parent processes SIGCHLD handler set to default after exec command
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
does parent processes SIGCHLD handler set to default after exec command
|
|
|
| Hi,
Have a basic question. Does parent processes SIGCHLD handler set to
default after exec command is executed. From man page of exec:
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.
what is the meaning of the last line here.
Thanks,
Sand
| |
| Barry Margolin 2006-07-27, 7:00 pm |
| In article <1154000269.510589.148590@h48g2000cwc.googlegroups.com>,
"san" <sandeep.gond@gmail.com> wrote:
> Hi,
>
> Have a basic question. Does parent processes SIGCHLD handler set to
> default after exec command is executed. From man page of exec:
Nothing in the parent process is affected by exec. This man page is
describing what happens in the child process that calls exec, not the
parent process.
> 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.
> what is the meaning of the last line here.
If you set the SO_ONSTACK flag when calling sigaction(), it will be
ignored when you've used exec().
This seems redundant to me. I think the alternate stack is only
relevant if you're catching the signal, and calling exec() sets any
signals that are being caught back to the default action.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
|
|
|
|
|