From 52c9f8bc70db07b56fa365c253cae679874a7197 Mon Sep 17 00:00:00 2001 From: Mike Makonnen Date: Wed, 3 Mar 2004 15:28:44 +0000 Subject: [PATCH] Some (most?) processes don't cleanup their pid files when they exit. Sometimes they simply can't (core-dump, for example). So, when searching for a running program send standard error output from ps(1) to never-never land. # This should quite those # ps: kvm_getprocs: No such user # errors. Since ports use a duplicate rc.subr(8) you might # still see this error from ports startup scripts. --- etc/rc.subr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/rc.subr b/etc/rc.subr index 48aadb92efb3..9830ec86ac88 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -267,7 +267,7 @@ _find_processes() fi _proccheck=' - ps -o "pid,command" '"$_psargs"' | + ps 2>/dev/null -o "pid,command" '"$_psargs"' | while read _npid '"$_fp_args"'; do case "$_npid" in PID)