Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/etc Pull up following revision(s) (requested by phx in ti...
details: https://anonhg.NetBSD.org/src/rev/9dc90eaea397
branches: netbsd-7
changeset: 799679:9dc90eaea397
user: riz <riz%NetBSD.org@localhost>
date: Sun Nov 08 00:45:22 2015 +0000
description:
Pull up following revision(s) (requested by phx in ticket #1015):
etc/rc.subr: revision 1.97
PR misc/50046
Remove the expensive tests in _have_rc_postprocessor(), as proposed by apb@.
It more than halves the multiuser boot time on slow machines and brings
it back near to the previous level.
diffstat:
etc/rc.subr | 18 ++++--------------
1 files changed, 4 insertions(+), 14 deletions(-)
diffs (32 lines):
diff -r 35cb3aa27d62 -r 9dc90eaea397 etc/rc.subr
--- a/etc/rc.subr Sun Nov 08 00:42:27 2015 +0000
+++ b/etc/rc.subr Sun Nov 08 00:45:22 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: rc.subr,v 1.94 2014/07/27 07:46:46 apb Exp $
+# $NetBSD: rc.subr,v 1.94.2.1 2015/11/08 00:45:22 riz Exp $
#
# Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -796,19 +796,9 @@
_have_rc_postprocessor()
{
# Cheap tests that fd and pid are set, fd is writable.
- [ -n "${_rc_postprocessor_fd}" ] || return 1
- [ -n "${_rc_pid}" ] || return 1
- eval ": >&${_rc_postprocessor_fd}" 2>/dev/null || return 1
-
- # More expensive test that pid is running.
- # Unset _rc_pid if this fails.
- kill -0 "${_rc_pid}" 2>/dev/null \
- || { unset _rc_pid; return 1; }
-
- # More expensive test that pid appears to be
- # a shell running an rc script.
- # Unset _rc_pid if this fails.
- expr "$(ps -p "${_rc_pid}" -o command=)" : ".*sh .*/rc.*" >/dev/null \
+ [ -n "${_rc_pid}" ] || { unset _rc_pid; return 1; }
+ [ -n "${_rc_postprocessor_fd}" ] || { unset _rc_pid; return 1; }
+ eval ": >&${_rc_postprocessor_fd}" 2>/dev/null \
|| { unset _rc_pid; return 1; }
return 0
Home |
Main Index |
Thread Index |
Old Index