diff options
author | Akinori MUSHA <knu@FreeBSD.org> | 2001-05-07 18:07:29 +0000 |
---|---|---|
committer | Akinori MUSHA <knu@FreeBSD.org> | 2001-05-07 18:07:29 +0000 |
commit | 3b26be6ae163771679f086bb3426661ba369cb27 (patch) | |
tree | e1588d1901be2ac4c48004bee51340074edfeca8 /sys/kern/kern_sig.c | |
parent | a66173abd23d53097fc2652627b8b370246f7935 (diff) | |
download | src-3b26be6ae163771679f086bb3426661ba369cb27.tar.gz src-3b26be6ae163771679f086bb3426661ba369cb27.zip |
Properly copy the P_ALTSTACK flag in struct proc::p_flag to the child
process on fork(2).
It is the supposed behavior stated in the manpage of sigaction(2), and
Solaris, NetBSD and FreeBSD 3-STABLE correctly do so.
The previous fix against libc_r/uthread/uthread_fork.c fixed the
problem only for the programs linked with libc_r, so back it out and
fix fork(2) itself to help those not linked with libc_r as well.
PR: kern/26705
Submitted by: KUROSAWA Takahiro <fwkg7679@mb.infoweb.ne.jp>
Tested by: knu, GOTOU Yuuzou <gotoyuzo@notwork.org>,
and some other people
Not objected by: hackers
MFC in: 3 days
Notes
Notes:
svn path=/head/; revision=76336
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r-- | sys/kern/kern_sig.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index c57074aa8f27..55da02307414 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -464,6 +464,7 @@ execsigs(p) p->p_sigstk.ss_flags = SS_DISABLE; p->p_sigstk.ss_size = 0; p->p_sigstk.ss_sp = 0; + p->p_flag &= ~P_ALTSTACK; /* * Reset no zombies if child dies flag as Solaris does. */ |