This is a follow on question to
How do you a trap the event that occurs when you close the lid and later reopen it from a bash script?
From reading the source it seems like this program uses the apple-specific
IORegisterForSystemPower function which allows the small C-daemon to be notified by the system before the syetm goes to sleep and after it wakes back up.
There is no generic ACPI daemon on Mac OS X that I know of.