[X-Unix] Find if shutdown is in progress
Charles Miles
cmiles at amclasstyler.com
Mon Mar 28 13:21:59 PDT 2011
Jerry,
Your question intrigued me so I did a quick google search and found
your thread on the darwin kernel list and the tidbit at the link
below. Don't know if it will help, and suppose you may have already
seen it:
http://stackoverflow.com/questions/1321219/receiving-power-notifications-especially-shutdown-on-mac-osx
Hope this helps.
Charles Miles
Systems Administrator
American Classifieds of Tyler
903-597-2516 ext 225
903-597-8726 Fax
903-714-3652 Cell
cmiles at amclasstyler.com
On Mar 24, 2011, at 1:15 PM, Jerry Krinock wrote:
> 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
>
> _______________________________________________
> X-Unix mailing list
> X-Unix at listserver.themacintoshguy.com
> http://listserver.themacintoshguy.com/mailman/listinfo/x-unix
More information about the X-Unix
mailing list