use the same string for the log and uprintf.

This commit is contained in:
christos 2017-08-06 09:14:14 +00:00
parent adc2129548
commit 7869295617
1 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_synch.c,v 1.311 2016/07/03 14:24:58 christos Exp $ */
/* $NetBSD: kern_synch.c,v 1.312 2017/08/06 09:14:14 christos Exp $ */
/*-
* Copyright (c) 1999, 2000, 2004, 2006, 2007, 2008, 2009
@ -69,7 +69,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.311 2016/07/03 14:24:58 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.312 2017/08/06 09:14:14 christos Exp $");
#include "opt_kstack.h"
#include "opt_perfctrs.h"
@ -1208,11 +1208,11 @@ sched_pstats(void)
if (__predict_false(runtm >= rlim->rlim_cur)) {
if (runtm >= rlim->rlim_max) {
sig = SIGKILL;
log(LOG_NOTICE, "pid %d is killed: %s\n",
p->p_pid, "exceeded RLIMIT_CPU");
log(LOG_NOTICE,
"pid %d, command %s, is killed: %s\n",
p->p_pid, p->p_comm, "exceeded RLIMIT_CPU");
uprintf("pid %d, command %s, is killed: %s\n",
p->p_pid, p->p_comm,
"exceeded RLIMIT_CPU");
p->p_pid, p->p_comm, "exceeded RLIMIT_CPU");
} else {
sig = SIGXCPU;
if (rlim->rlim_cur < rlim->rlim_max)