[Libevent-users] running as a forked process errors out
Bob Maccione
Bob.Maccione at hilton.com
Fri Aug 24 00:34:48 EDT 2007
I have a simple app that I tried to convert to run as a daemon.
This is on Solaris and when i do the fork() I get the following error
from the event_dispatch()
ioctl: DP_POLL: Permission denied
event_dispatch received an error of -1
I'm wondering if anyone has seen this before or has working daemon code
that they would be willing to share..
I've tried the following
if( fork() ) {
exit(0);
}
setsid();
if( fork() ) {
exit(0);
}
then do the rest of the code....
the 2 forks are recommended in all of the popular texts (i.e. Stevens
)...
thanks for any help,
bobm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://monkeymail.org/archives/libevent-users/attachments/20070823/acd467e6/attachment.htm
More information about the Libevent-users
mailing list