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. http://developer.apple.com/samplecode/SampleD/listing3.html -- Damien Sorresso BSD Engineering Apple Inc.