Cocoa & signal handlers
Cocoa & signal handlers
- Subject: Cocoa & signal handlers
- From: Ingvar Nedrebo <email@hidden>
- Date: Tue, 4 Dec 2001 12:12:03 +0000
I'm writing a small daemon to perform a periodic task, and was planning
to use NSTimer for that. However, I want my server to respond to
"standard"
Unix server signals, i.e. re-read configuration on SIGHUP and terminate
and remove its pid-file on SIGTERM.
My understanding from searching is that it is not safe to call any
Cocoa API from a signal handler, so I was hoping somebody could recommend
some kind of mechanism to generate a safe event in the signal handler
that I can pick up in the run loop and Do The Right Thing?
Regards
Ingvar