Source-Changes-HG archive

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

[src/trunk]: src/etc Hide ps error about processes not found (we could be mor...



details:   https://anonhg.NetBSD.org/src/rev/6dcddfaed8f3
branches:  trunk
changeset: 361071:6dcddfaed8f3
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Apr 11 18:51:22 2018 +0000

description:
Hide ps error about processes not found (we could be more specific...)
It is superfluous, since we print:
    foo not running? (check /var/run/foo/foo.pid).

diffstat:

 etc/rc.subr |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (22 lines):

diff -r af25f6ff6a7c -r 6dcddfaed8f3 etc/rc.subr
--- a/etc/rc.subr       Wed Apr 11 18:34:18 2018 +0000
+++ b/etc/rc.subr       Wed Apr 11 18:51:22 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: rc.subr,v 1.101 2018/04/01 18:26:51 kre Exp $
+# $NetBSD: rc.subr,v 1.102 2018/04/11 18:51:22 christos Exp $
 #
 # Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -294,10 +294,10 @@
        fi
 
        _proccheck='
-               ps -o "pid,args" '"$_psargs"' |
+               ps -o "pid,args" '"$_psargs"' 2>&1 |
                while read _npid '"$_fp_args"'; do
                        case "$_npid" in
-                           PID)
+                       ps:|PID)
                                continue ;;
                        esac ; '"$_fp_match"'
                                echo -n "$_pref$_npid" ;



Home | Main Index | Thread Index | Old Index