freebsd-src/usr.sbin
Jessica Clarke a45048565a bsdinstall: Fix race condition when shutting down after installation
Whilst reboot(8) will block whilst it runs, shutdown(8) does not,
daemonizing instead. This means that we must wait after running it,
otherwise we will exit and cause the system to attempt to go multi-user
in parallel with the shutdown daemon killing init. With the new
multi-console support in the installer, runconsoles will immediately
kill this daemon, racing with the daemon being able to signal init as
desired, and I have seen this race be lost in QEMU with a single CPU. In
the past this wasn't such an issue, since shutdown's daemon puts itself
in a new session group immediately after fork (and the parent doesn't
wait until that has happened, so whilst there's technically a race
condition in there where it could receive a SIGHUP from the death of the
parent's session leader, in practice this is very unlikely to be hit.
This means that the only consequence of this oversight before was that
you might get the beginnings of more console output on the way to
multi-user and thus the console would look a little confusing.

Reviewed by:	gjb
Fixes:		e4505364c0 ("release/rc.local: Provide option to shutdown after installation complete")
Fixes:		a09af1b7fd ("bsdinstall release: Start installer on multiple consoles")
Differential Revision:	https://reviews.freebsd.org/D36879
2022-10-06 20:04:04 +01:00
..
ac pkgbase: Put accounting utilities in the acct package 2022-08-16 21:15:19 +02:00
accton
acpi Decode couple arrays in NFIT table. 2022-08-18 21:30:38 -04:00
adduser
apm Fix build with -DNO_ROOT 2021-11-26 12:51:08 +01:00
apmd
arp arp(8): use getifaddrs(3) instead of ioctl(SIOCGIFCONF) 2022-07-04 20:56:29 -07:00
audit
auditd
auditdistd
auditreduce
authpf
autofs pkgbase: Put autofs config files in the FreeBSD-autofs package 2021-12-21 10:17:25 +01:00
bhyve bhyve: Don't free an invalid pointer. 2022-10-03 16:10:44 -07:00
bhyvectl bhyve/snapshot: ..back to SOCK_STREAM 2022-04-28 07:43:01 -08:00
bhyveload
binmiscctl
blacklistctl
blacklistd
bluetooth Indicate that X(7) cross refs are satisfied by ports/x11/xorg-docs. 2022-08-14 12:01:30 +02:00
boot0cfg
bootparamd Fix too small hostname buffer in bootparamd 2022-02-06 15:25:49 +01:00
boottrace boottrace(8): small wrapper utility 2022-02-21 20:16:12 -04:00
bsdconfig Indicate the port where the referenced man pages come from. 2022-08-16 20:57:30 +02:00
bsdinstall bsdinstall: Fix race condition when shutting down after installation 2022-10-06 20:04:04 +01:00
bsnmpd snmp_hostres(3): Fix a typo in a debug message 2022-07-03 14:57:12 +02:00
btxld
camdd
cdcontrol
certctl certctl: Introduce a new -d <distbase> option 2022-07-14 01:23:42 +01:00
chkgrp
chown chown: see also chmod. 2022-08-24 20:21:39 +02:00
chroot chroot: fix typo in usage 2021-07-21 10:16:11 +01:00
ckdist
clear_locks
config Indicate which port gdb.1 and kgdb.1 come from. 2022-08-17 19:13:22 +02:00
cpucontrol cpucontrol(8): Fix a typo in an error message 2022-01-26 10:36:42 +01:00
crashinfo Indicate that kgdb.1 is from ports/devel/gdb. 2022-08-14 15:17:29 +02:00
cron cron(8): Fix a typo in a source code comment 2022-09-03 15:00:29 +02:00
crunch crunchide(1): Fix a typo in a comment 2022-07-16 13:32:47 +02:00
ctladm ctladm: Fix typo in command line help. 2022-08-11 16:53:50 -04:00
ctld iscsi: Fetch limits based on a socket rather than assuming global limits. 2022-04-18 12:53:28 -07:00
cxgbetool cxgbetool(8): Fix a typo in a source code comment 2022-09-15 10:29:54 +02:00
daemon When -u option is used also set USER, HOME and SHELL variables. 2022-08-12 10:07:56 -07:00
dconschat manpages: Remove telnetd references 2022-09-29 17:56:41 +01:00
devctl man pages: Fix typo 2022-04-07 14:58:13 +02:00
devinfo devinfo: xref devctl 2022-07-05 15:15:08 -06:00
diskinfo
dumpcis
editmap
edquota
efibootmgr efibootmgr: Use the hier(7) ESP mount point in examples 2022-04-03 14:52:07 +02:00
efidp pkgbase: Remove libefivar package and add a efi-tools one 2021-09-07 10:24:21 +02:00
efitable efitable(8): Add missing -u in the manpage 2022-01-28 03:04:38 +02:00
efivar efivar(8): Fix a typo in a source code comment 2022-04-02 13:34:46 +02:00
etcupdate etcupdate: Fix -N support for build command 2022-10-03 17:16:19 +01:00
extattr
extattrctl
fdcontrol
fdformat
fdread
fdwrite The fdformat man page is in section 8 (not 1). 2022-08-14 18:14:52 +02:00
fifolog
flowctl
freebsd-update uname.1: Clarify the -r option 2022-09-16 13:27:54 +02:00
fstyp Add a flags parameter to the ffs_sbget() function that reads UFS superblocks. 2022-07-30 22:51:38 -07:00
ftp-proxy
fwcontrol fwcontrol: eliminate set but not used warning 2022-03-10 15:51:27 -05:00
getfmac
getpmac
gpioctl
gssd pkgbase: Create a FreeBSD-kerberos package 2021-09-07 10:23:14 +02:00
gstat ncurses: chase dependency changes in the source tree 2021-10-04 11:38:24 +02:00
hyperv
i2c i2c(8): fix option handling 2021-10-06 21:56:20 -08:00
ifmcstat
inetd manpages: Remove telnetd references 2022-09-29 17:56:41 +01:00
iostat
iovctl
ip6addrctl
ipfwpcap ipfwpcap: use PF_DIVERT/SOCK_RAW instead of PF_INET/SOCK_RAW/IPPROTO_DIVERT 2022-08-30 16:24:37 -07:00
iscsid iscsi: Fetch limits based on a socket rather than assuming global limits. 2022-04-18 12:53:28 -07:00
jail jail.8: Fix formatting of synopsis and some code examples 2022-07-18 13:41:35 +02:00
jexec jexec man: Explain how PATH is adjusted. 2022-05-19 16:58:32 +03:00
jls
kbdcontrol
kbdmap Fix too small sscanf output buffers in kbdmap 2022-02-06 16:25:25 +01:00
keyserv
kldxref kldxref: add R_PPC_ADDR32 handler 2022-02-10 12:15:47 -03:00
lastlogin pkgbase: Put accounting utilities in the acct package 2022-08-16 21:15:19 +02:00
lpr Indicate that xrefs to *roff,tbl,eqn et al are found in ports/textproc/groff. 2022-08-15 22:15:18 +02:00
lptcontrol
mailstats
mailwrapper
makefs makefs: Add a cast to placate static analyzers 2022-10-04 13:05:54 -04:00
makemap
manctl
memcontrol
mergemaster mergemaster(8): Fix a typo in an error message 2022-01-26 17:59:49 +01:00
mfiutil mfiutil.8: Fix some mandoc warnings 2022-08-07 17:24:48 +02:00
mixer mixer: remove volume backwards compat, add % interpretation 2022-06-17 22:50:58 -05:00
mld6query
mlx5tool pkgbase: Create a mlx-tools package 2021-09-07 10:20:16 +02:00
mlxcontrol pkgbase: Move back mlxcontrol in the default package 2021-09-09 08:14:53 +02:00
mount_smbfs
mountd exports.5: Clean up EXAMPLES and STANDARDS 2022-08-16 15:04:44 +02:00
moused moused(8): Fix a common typo in source code comments 2022-02-06 13:47:25 +01:00
mpsutil mpsutil: Fix device speed reporting. 2022-05-09 18:03:24 -04:00
mptable
mptutil
mtest
ndp ndp(8): add structured output formatting via libxo 2022-07-08 11:39:34 +00:00
newsyslog When parsing a rule to rotate log files on a specific week day, 2021-12-30 20:45:13 +00:00
nfscbd
nfsd Fix dead references (wrong section) to sysctl(8). 2022-09-16 20:00:49 +02:00
nfsdumpstate
nfsrevoke
nfsuserd
ngctl
nghook
nmtree pkgbase: Create a FreeBSD-mtree package 2021-12-21 10:17:33 +01:00
nologin
nscd
ntp Update leap-seconds to leap-seconds.3676924800 2022-03-13 23:37:56 -07:00
nvram
ofwdump ofwdump.8: Remove references to eeprom(8) 2022-02-27 09:03:42 -07:00
pciconf pciconf: Fix PCIS_CRYPTO_ENTERTAIN copy/paste. 2022-02-09 15:56:30 -05:00
periodic pfdenied: match actual variable name to the documented one 2022-03-12 23:59:25 +01:00
pkg pkg(8): Remove a double word in a source code comment 2022-09-04 17:28:16 +02:00
pmc ncurses: chase dependency changes in the source tree 2021-10-04 11:38:24 +02:00
pmcannotate pmcannotate: Don't increment end address passed to objdump -d. 2022-06-14 10:52:54 -07:00
pmccontrol
pmcstat pmcstat: fix log analysis 2022-07-04 12:42:39 -04:00
pmcstudy pmcstudy: Fix a typo in a usage message 2022-01-24 19:41:39 +01:00
pnfsdscopymr
pnfsdsfile
pnfsdskill
pnpinfo
portsnap
powerd powerd(8): Add rc.conf(5) to see also 2021-11-06 22:43:30 -04:00
ppp Bump .Dd for recently modified manual pages 2022-06-27 18:20:03 +02:00
pppctl
praliases
praudit
prometheus_sysctl_exporter prometheus_sysctl_exporter: ignore ENOENT for mibs specified on the CLI 2022-07-24 09:19:46 -06:00
pstat swapinfo.8: Mention BLOCKSIZE in the ENVIRONMENT section 2022-07-08 21:35:33 +02:00
pw Put OPIE to rest. 2022-10-02 03:37:29 +02:00
pwd_mkdb
pwm
quot Add a flags parameter to the ffs_sbget() function that reads UFS superblocks. 2022-07-30 22:51:38 -07:00
quotaon
rarpd
repquota
rip6query
rmt
route6d
rpc.lockd rpc.lockd: Explicitly cast enum nlm_stats values to enum nlm4_stats. 2022-10-03 16:10:42 -07:00
rpc.statd
rpc.tlsclntd rpc.tlsclntd.8: Fix the RFC number now that it exists 2022-09-23 16:59:29 -07:00
rpc.tlsservd rpc.tlsservd.8: Fix the RFC number now that it exists 2022-09-23 16:53:36 -07:00
rpc.umntall
rpc.yppasswdd pkgbase: Put yellow pages programs to its own package 2021-12-21 10:17:22 +01:00
rpc.ypupdated pkgbase: Put yellow pages programs to its own package 2021-12-21 10:17:22 +01:00
rpc.ypxfrd pkgbase: Put yellow pages programs to its own package 2021-12-21 10:17:22 +01:00
rpcbind rpcbind: get contact addr from xprt members 2022-06-13 08:54:08 -05:00
rrenumd rrenumd: remove a set-but-not-used variable 2022-04-20 17:02:24 +02:00
rtadvctl
rtadvd
rtprio Add idle priority scheduling privilege group to MAC/priority 2021-12-10 04:54:48 +02:00
rtsold rtsold: fix memory leak in script execution 2022-02-25 09:30:29 -06:00
rwhod
sa lastcomm/sa: Remove sparc64 tests, they aren't needed. 2021-10-04 10:51:15 -06:00
sendmail
service pkgbase: Put more binaries/lib in runtime 2021-12-21 10:17:27 +01:00
services_mkdb ctlstat: add prometheus output 2022-04-20 15:18:41 -06:00
sesutil sesutil.8: Polish 2022-07-05 16:39:01 +02:00
setfib
setfmac
setpmac
smbmsg
snapinfo
spi
spkrtest spkrtest(8): Replace dialog with bsddialog 2022-03-16 01:48:53 +01:00
spray
syslogd pkgbase: Create a FreeBSD-syslogd package 2021-12-21 10:17:40 +01:00
sysrc sysrc.8: Mention it requires chroot(8) 2022-04-03 13:54:11 +02:00
tcpdchk pkgbase: Create a FreeBSD-tcpd package 2021-12-21 10:17:31 +01:00
tcpdmatch pkgbase: Create a FreeBSD-tcpd package 2021-12-21 10:17:31 +01:00
tcpdrop tcpdrop: tweak comments 2021-12-04 15:08:01 +01:00
tcpdump
tcpsso tcp_sso: add support for TCP_MAXUNACKTIME 2022-09-29 02:02:11 +02:00
tests
traceroute
traceroute6 traceroute6: fix capabilities for the rcv socket 2022-10-04 23:40:29 +02:00
trim
trpt inet: remove tcp_debug from netinet/tcp_debug.h 2021-11-01 23:10:30 +00:00
tzsetup tzsetup: remove left overs from libbsddialog conversion 2022-08-26 11:54:17 +02:00
uathload
uefisign
ugidfw
uhsoctl uhsoctl.1: Fix the man page date 2022-07-31 12:27:10 +02:00
unbound unbound: Adjust version string 2022-10-01 06:51:30 -07:00
usbconfig usbconfig.8: Sort flags according to style(9) 2022-01-29 22:10:21 +01:00
usbdump
utx pkgbase: Put accounting utilities in the acct package 2022-08-16 21:15:19 +02:00
valectl
vidcontrol vidcontrol: disable p, P, and H when vt(4) is in use 2022-04-06 20:26:43 -04:00
vigr
vipw
wake
watch ncurses: chase dependency changes in the source tree 2021-10-04 11:38:24 +02:00
watchdogd
wlandebug
wpa Oops, wlan(4) is not the removed an(4). Restore that paragraph. 2022-08-16 21:08:17 +02:00
yp_mkdb pkgbase: Put yellow pages programs to its own package 2021-12-21 10:17:22 +01:00
ypbind ypbind(8): Fix a typo in the man page 2022-03-27 20:42:24 +02:00
ypldap ypldap: Fix mismatch in array bounds for ldapclient(). 2022-10-03 16:10:41 -07:00
yppoll pkgbase: Put yellow pages programs to its own package 2021-12-21 10:17:22 +01:00
yppush pkgbase: Put yellow pages programs to its own package 2021-12-21 10:17:22 +01:00
ypserv pkgbase: Put yellow pages programs to its own package 2021-12-21 10:17:22 +01:00
ypset pkgbase: Put yellow pages programs to its own package 2021-12-21 10:17:22 +01:00
zic
zonectl
zzz
Makefile boottrace(8): small wrapper utility 2022-02-21 20:16:12 -04:00
Makefile.aarch64 Fix the name of Makefile.aarch64 2022-05-19 11:30:21 +01:00
Makefile.amd64 Fix build with -DNO_ROOT 2021-11-26 12:51:08 +01:00
Makefile.arm
Makefile.i386
Makefile.inc
Makefile.powerpc
Makefile.riscv