[launchd-dev] Diagnosing launchd daemon failure to launch
dsorresso at apple.com
Thu Nov 6 11:04:05 PST 2008
On Nov 6, 2008, at 10:37 AM, Iain Delaney wrote:
> Ahh, that was the problem. So the real issue is that my daemon is
> loading, but not responding to my client app.
> I'm trying to use Distributed Objects on top of UNIX Domain sockets.
> The directory for the socket is /var/tmp, and the client and server
> can communicate if I run both programs inside XCode. However, when I
> move the daemon program to /Library/PrivilegedHelperTools and copy
> to plist into /Library/LaunchDaemons everything stops working. The
> client seems to be hanging while trying to connect to the socket.
> Any ideas what I'm doing wrong?
I would highly recommend choosing a more stable location for your
socket, first of all. /var/tmp gets cleaned out periodically; I'd
suggest /var/run, which is only cleaned out at boot-time.
Also, have you specified the socket in your daemon's launchd.plist(5),
and does your daemon check in with launchd to obtain the descriptor
for the socket? If the answer to either of these questions is "No",
please see the SampleD project.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2474 bytes
Desc: not available
More information about the launchd-dev