shutdown(1M) needs modernizing
In some distros, the shutdown(1M) command is invoked as part of brand-specific processing. Currently, shutdown(1M) may launch background processes like wall(1M) that open consoles. If these lose a race to zoneadmd(1M) beginning its own shutdown procedures, it can cause the zone shutdown to fail altogether.
Instead, if shutdown knows it's in a non-global zone, use pwait(1) to wait for any backgrounded processes.
Updated by Dan McDonald about 4 years ago
- Subject changed from shutdown(1M) in non-global zones need to wrangle their processes to shutdown(1M) needs modernizing
Upon review, forking off background processes is considered a Bad Idea (TM) for shutdown(1M).
Also, shutdown needs to check for SMF running prior to invoking init, in case it's called prior to full system bringup.
Updated by Electric Monk about 4 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 3bf13137914e56c8fbc66be397fadb819121166c Author: Dan McDonald <firstname.lastname@example.org> Date: 2017-04-07T15:35:17.000Z 8034 shutdown(1M) needs modernizing Reviewed by: Jerry Jelinek <email@example.com> Reviewed by: Peter Tribble <firstname.lastname@example.org> Approved by: Joshua M. Clulow <email@example.com>