I have a daemon process started via launchd. This will be running even during DarkWake and has no time to finish before OS X goes back to sleep again.
I can think of the following solutions, but didn't find a way to achieve this.
Don't make this daemon process run during DarkWake.
I went through Apple documentation and forums but didn't find any reference for this.
During DarkWake via daemon process make the OS wait until its done.
Tried with calling pmset noidle and caffeinate in daemon process. It didn't work. OS X went to sleep. It seems OS X suppresses the delivery of many notifications when in DarkWake mode.
Detect DarkWake mode in daemon process.
Didnt find any solution/method to detect DarkWake mode.
Please help.