No one seems to know the answer on Apple's Darwin developer forum. So I figured if anyone knows, it would be one of you guys. Short version: Is there any command or other trick I can perform to find out if system shutdown is currently in progress? More detail: I want to do this so I can prevent my command-line program from starting a long task which is triggered, sometimes, when other apps terminate. There are a couple of API with which I can register for notifications (NSWorkspaceWillPowerOffNotification, IORegisterForSystemPower) and supposedly get a callback, but they don't work in this context. Thanks, Jerry Krinock