Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3]: src/sys/kern Pull up revision 1.122 (requested by cube in tic...



details:   https://anonhg.NetBSD.org/src/rev/05a034406ba9
branches:  netbsd-3
changeset: 575859:05a034406ba9
user:      snj <snj%NetBSD.org@localhost>
date:      Sun May 22 19:33:34 2005 +0000

description:
Pull up revision 1.122 (requested by cube in ticket #316):
Add P_CLDSIGIGN, P_NOCLDSTOP and P_NOCLDWAIT to the list of flags we want
to inherit from the parent process.

diffstat:

 sys/kern/kern_fork.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (33 lines):

diff -r 799eb3e3e5bf -r 05a034406ba9 sys/kern/kern_fork.c
--- a/sys/kern/kern_fork.c      Sun May 22 19:27:28 2005 +0000
+++ b/sys/kern/kern_fork.c      Sun May 22 19:33:34 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_fork.c,v 1.121 2005/03/02 11:05:34 mycroft Exp $  */
+/*     $NetBSD: kern_fork.c,v 1.121.2.1 2005/05/22 19:33:34 snj Exp $  */
 
 /*-
  * Copyright (c) 1999, 2001, 2004 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_fork.c,v 1.121 2005/03/02 11:05:34 mycroft Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_fork.c,v 1.121.2.1 2005/05/22 19:33:34 snj Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_systrace.h"
@@ -292,9 +292,12 @@
         * Duplicate sub-structures as needed.
         * Increase reference counts on shared objects.
         * The p_stats and p_sigacts substructs are set in uvm_fork().
-        * Inherit SUGID, STOPFORK and STOPEXEC flags.
+        * Inherit flags we want to keep.  The flags related to SIGCHLD
+        * handling are important in order to keep a consistent behaviour
+        * for the child after the fork.
         */
-       p2->p_flag = p1->p_flag & (P_SUGID | P_STOPFORK | P_STOPEXEC);
+       p2->p_flag = p1->p_flag & (P_SUGID | P_STOPFORK | P_STOPEXEC |
+           P_NOCLDSTOP | P_NOCLDWAIT | P_CLDSIGIGN);
        p2->p_emul = p1->p_emul;
        p2->p_execsw = p1->p_execsw;
 



Home | Main Index | Thread Index | Old Index