Project

General

Profile

Bug #8034

shutdown(1M) needs modernizing

Added by Dan McDonald almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2017-04-04
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

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.

History

#1

Updated by Dan McDonald almost 3 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.

#2

Updated by Electric Monk almost 3 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 3bf13137914e56c8fbc66be397fadb819121166c

commit  3bf13137914e56c8fbc66be397fadb819121166c
Author: Dan McDonald <danmcd@omniti.com>
Date:   2017-04-07T15:35:17.000Z

    8034 shutdown(1M) needs modernizing
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Reviewed by: Peter Tribble <peter.tribble@gmail.com>
    Approved by: Joshua M. Clulow <josh@sysmgr.org>

Also available in: Atom PDF