Manually set timer forcing application exit on shutdown

Discussion in 'macOS Sierra (10.12)' started by Susurs, Dec 6, 2016.

  1. Susurs, Dec 6, 2016
    Last edited: Dec 6, 2016

    Susurs macrumors 6502

    Susurs

    Joined:
    Jun 18, 2010
    #1
    Hi!

    Could somebody, please advise me on how to correctly manually set timers to force processes to quit when mac is shutting down in macOS Sierra?

    Commands below were working in Yosemite but does not work in Sierra (10.12.1):

    sudo defaults write /System/Library/LaunchAgents/com.apple.coreservices.appleid.authentication ExitTimeOut -int 1

    sudo defaults write /System/Library/LaunchDaemons/com.apple.coreservices.appleevents ExitTimeOut -int 1

    sudo defaults write /System/Library/LaunchDaemons/com.apple.diskarbitrationd ExitTimeOut -int 1

    sudo defaults write /System/Library/LaunchDaemons/com.apple.mDNSResponder ExitTimeOut -int 1

    sudo defaults write /System/Library/LaunchDaemons/com.apple.securityd ExitTimeOut -int 1
     
  2. Susurs thread starter macrumors 6502

    Susurs

    Joined:
    Jun 18, 2010
    #2
    This is what I get in the terminal: Could not write domain...
     
  3. Susurs thread starter macrumors 6502

    Susurs

    Joined:
    Jun 18, 2010
    #3
    Not a programmer, so I am sorry if I say something totally wrong :):)

    Maybe some info on the following pages could help to answer my question:

    On Launchd: http://www.launchd.info/

    The Life Cycle of a Daemon. Terminating processes:
    https://developer.apple.com/library...ptual/BPSystemStartup/Chapters/Lifecycle.html

    P.S. Here is my com.apple.coreservices.appleid.authentication .plist in /system/Library/LaunchAgents...

    < ?xml version="1.0" encoding="UTF-8"?>
    < !DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

    < plist version="1.0">
    < dict>
    < key>Label</key>
    < string>com.apple.coreservices.appleid.authentication</string>
    < key>LimitLoadToSessionType</key>
    < array>
    < string>Aqua</string>
    < string>LoginWindow</string>
    < /array>
    < key>MachServices</key>
    < dict>
    < key>com.apple.coreservices.appleid.aps</key>
    < true/>
    < key>com.apple.coreservices.appleid.authentication</key>
    < true/>
    < /dict>
    < key>POSIXSpawnType</key>
    < string>Adaptive</string>
    < key>Program</key>
    < string>/System/Library/CoreServices/AppleIDAuthAgent</string>
    < key>RunAtLoad</key>
    < true/>
    < /dict>
    < /plist>
    --- Post Merged, Dec 6, 2016 ---
    Could I try to manually add ExitTimeOut or this is not the case/not possible anyway?
    < key>ExitTimeOut</key>
    < integer>500</integer>
     
  4. Susurs thread starter macrumors 6502

    Susurs

    Joined:
    Jun 18, 2010
    #4
    SIP was the problem! Disabled it and was able to run commands correctly.
     

Share This Page