Source-Changes-HG archive

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

[src/netbsd-6]: src/sys/kern Pull up following revision(s) (requested by chri...



details:   https://anonhg.NetBSD.org/src/rev/b290f34b7e98
branches:  netbsd-6
changeset: 775471:b290f34b7e98
user:      riz <riz%NetBSD.org@localhost>
date:      Tue Nov 20 21:32:24 2012 +0000

description:
Pull up following revision(s) (requested by christos in ticket #670):
        sys/kern/kern_exec.c: revision 1.358
If you are going to dick around with p_stat, remember to put it
back so that spawn processes with attributes don't end up starting
up stopped!
XXX: pullup to 6.

diffstat:

 sys/kern/kern_exec.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (42 lines):

diff -r 7dcb48576d8e -r b290f34b7e98 sys/kern/kern_exec.c
--- a/sys/kern/kern_exec.c      Tue Nov 20 21:26:30 2012 +0000
+++ b/sys/kern/kern_exec.c      Tue Nov 20 21:32:24 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_exec.c,v 1.339.2.5 2012/04/16 15:28:19 riz Exp $  */
+/*     $NetBSD: kern_exec.c,v 1.339.2.6 2012/11/20 21:32:24 riz Exp $  */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.339.2.5 2012/04/16 15:28:19 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.339.2.6 2012/11/20 21:32:24 riz Exp $");
 
 #include "opt_exec.h"
 #include "opt_ktrace.h"
@@ -1916,6 +1916,7 @@
 
        /* handle posix_spawnattr */
        if (spawn_data->sed_attrs != NULL) {
+               int ostat;
                struct sigaction sigact;
                sigact._sa_u._sa_handler = SIG_DFL;
                sigact.sa_flags = 0;
@@ -1924,6 +1925,7 @@
                 * set state to SSTOP so that this proc can be found by pid.
                 * see proc_enterprp, do_sched_setparam below
                 */
+               ostat = l->l_proc->p_stat;
                l->l_proc->p_stat = SSTOP;
 
                /* Set process group */
@@ -1985,6 +1987,7 @@
                                            0);
                        }
                }
+               l->l_proc->p_stat = ostat;
        }
 
        /* now do the real exec */



Home | Main Index | Thread Index | Old Index