From 3ef6ac33612253533f8ebe3da8450a1416f5d4af Mon Sep 17 00:00:00 2001 From: Jeff Roberson Date: Mon, 13 Dec 2004 16:45:57 +0000 Subject: [PATCH] - If delivering a signal will result in killing a process that has a nice value above 0, set it to 0 so that it may proceed with haste. This is especially important on ULE, where adjusting the priority does not guarantee that a thread will be granted a greater time slice. --- sys/kern/kern_sig.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index a3513ebbf3f1..f5c935b8e15f 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1959,6 +1959,8 @@ tdsigwakeup(struct thread *td, int sig, sig_t action) * killed in this lifetime. */ if (action == SIG_DFL && (prop & SA_KILL)) { + if (p->p_nice > 0) + sched_nice(td->td_proc, 0); if (td->td_priority > PUSER) sched_prio(td, PUSER); }