testing the bootstrap context for validity?
testing the bootstrap context for validity?
- Subject: testing the bootstrap context for validity?
- From: Bill Janssen <email@hidden>
- Date: Thu, 2 Apr 2009 10:01:20 PDT
[I mistakenly sent this to darwin-kernel...]
I seem to have a situation where the bootstrap context of a long-running
daemon process sometimes "goes bad". Not sure just what's happening,
but it can't seem to use any Mach ports. Can't connect to the
windowServer, can't do DNS lookups, etc. When I use 'launchctl bslist'
to look at the BC, I get an odd output:
> % sudo launchctl bslist 7942
> bootstrap_info(): 268435459
> %
Is there a function I could call from a process to check the current
bootstrap context? If the process could detect, in some systematic way,
whether or not its bootstrap context is still good, it could restart
when it needs to. (I can't call launchctl, because the process doesn't
run as root.)
Better yet, is there some way to prevent this context decay? My daemon
is not launched via launchd, it's just classic UNIX daemonization:
fork()
setsid()
fork()
exec()
Bill
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden