diff --git a/sys/kern/kern_sched.c b/sys/kern/kern_sched.c index fac0dd2f8..66f129304 100644 --- a/sys/kern/kern_sched.c +++ b/sys/kern/kern_sched.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sched.c,v 1.87 2023/08/29 16:19:34 claudio Exp $ */ +/* $OpenBSD: kern_sched.c,v 1.88 2023/08/31 19:29:51 cheloha Exp $ */ /* * Copyright (c) 2007, 2008 Artur Grabowski * @@ -88,26 +88,15 @@ sched_init_cpu(struct cpu_info *ci) spc->spc_idleproc = NULL; - if (spc->spc_itimer == NULL) { - spc->spc_itimer = clockintr_establish(&ci->ci_queue, - itimer_update); - if (spc->spc_itimer == NULL) { - panic("%s: clockintr_establish itimer_update", - __func__); - } - } - if (spc->spc_profclock == NULL) { - spc->spc_profclock = clockintr_establish(&ci->ci_queue, - profclock); - if (spc->spc_profclock == NULL) - panic("%s: clockintr_establish profclock", __func__); - } - if (spc->spc_roundrobin == NULL) { - spc->spc_roundrobin = clockintr_establish(&ci->ci_queue, - roundrobin); - if (spc->spc_roundrobin == NULL) - panic("%s: clockintr_establish roundrobin", __func__); - } + spc->spc_itimer = clockintr_establish(&ci->ci_queue, itimer_update); + if (spc->spc_itimer == NULL) + panic("%s: clockintr_establish itimer_update", __func__); + spc->spc_profclock = clockintr_establish(&ci->ci_queue, profclock); + if (spc->spc_profclock == NULL) + panic("%s: clockintr_establish profclock", __func__); + spc->spc_roundrobin = clockintr_establish(&ci->ci_queue, roundrobin); + if (spc->spc_roundrobin == NULL) + panic("%s: clockintr_establish roundrobin", __func__); kthread_create_deferred(sched_kthreads_create, ci); diff --git a/usr.sbin/fw_update/fw_update.sh b/usr.sbin/fw_update/fw_update.sh index 76f63393c..c27966a88 100644 --- a/usr.sbin/fw_update/fw_update.sh +++ b/usr.sbin/fw_update/fw_update.sh @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: fw_update.sh,v 1.45 2023/08/31 18:19:21 afresh1 Exp $ +# $OpenBSD: fw_update.sh,v 1.47 2023/08/31 21:29:53 afresh1 Exp $ # # Copyright (c) 2021,2023 Andrew Hewus Fresh # @@ -259,18 +259,23 @@ lock_db() { [ -e /usr/bin/perl ] || return 0 set -o monitor - perl <<'EOL' |& - use v5.16; - use warnings; + perl <<-'EOL' |& no lib ('/usr/local/libdata/perl5/site_perl'); + use v5.36; use OpenBSD::PackageInfo qw< lock_db >; $|=1; + $0 = "fw_update: lock_db"; lock_db(0); say $$; - sleep; + + # Wait for STDOUT to be readable, which won't happen + # but if our parent exits unexpectedly it will close. + my $rin = ''; + vec($rin, fileno(STDOUT), 1) = 1; + select $rin, '', '', undef; EOL set +o monitor @@ -702,7 +707,7 @@ for f in "${add[@]}" _update_ "${update[@]}"; do if "$pending_status"; then echo " failed." elif ! ((VERBOSE)); then - status "failed (${f##*/})" + status " failed (${f##*/})" fi continue } @@ -725,7 +730,7 @@ for f in "${add[@]}" _update_ "${update[@]}"; do if "$pending_status"; then echo " failed." elif ! ((VERBOSE)); then - status "failed ($i)" + status " failed ($i)" fi continue } @@ -736,7 +741,7 @@ for f in "${add[@]}" _update_ "${update[@]}"; do if "$pending_status"; then echo " failed." elif ! ((VERBOSE)); then - status "failed (${f##*/})" + status " failed (${f##*/})" fi continue }