Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern If you are going to dick around with p_stat, rememb...
details: https://anonhg.NetBSD.org/src/rev/eb1691c088a5
branches: trunk
changeset: 782604:eb1691c088a5
user: christos <christos%NetBSD.org@localhost>
date: Thu Nov 08 17:40:46 2012 +0000
description:
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 8883b65840b9 -r eb1691c088a5 sys/kern/kern_exec.c
--- a/sys/kern/kern_exec.c Thu Nov 08 16:36:53 2012 +0000
+++ b/sys/kern/kern_exec.c Thu Nov 08 17:40:46 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_exec.c,v 1.357 2012/10/14 20:56:55 christos Exp $ */
+/* $NetBSD: kern_exec.c,v 1.358 2012/11/08 17:40:46 christos 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.357 2012/10/14 20:56:55 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.358 2012/11/08 17:40:46 christos Exp $");
#include "opt_exec.h"
#include "opt_ktrace.h"
@@ -1897,6 +1897,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;
@@ -1905,6 +1906,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 */
@@ -1966,6 +1968,7 @@
0);
}
}
+ l->l_proc->p_stat = ostat;
}
/* now do the real exec */
Home |
Main Index |
Thread Index |
Old Index