#782 closed Defect (fixed)
Launchd Incompatibilities
Reported by: | dak180 | Owned by: | charlief |
---|---|---|---|
Priority: | Undetermined | Milestone: | Undetermined |
Component: | Client - Daemon | Version: | 6.2.18 |
Keywords: | launchd, OSX, 10.5, daemon | Cc: |
Description
With the attached plist launchd restarts boinc continuously because there is already a copy running.
This leads me to believe that boinc is not following the rules for a launchd controlled daemon.
A daemon or agent launched by launchd MUST NOT do the following in the process directly launched by launchd: oo Call daemon(3). oo Do the moral equivalent of daemon(3) by calling fork(2) and have the parent process exit(3) or _exit(2).
I am running the OS X version which is 6.2.18 not 6.2.19.
Attachments (1)
Change History (9)
Changed 16 years ago by
Attachment: | edu.berkeley.boinc.plist added |
---|
comment:1 Changed 16 years ago by
Version: | 6.2.19 → 6.2.18 |
---|
comment:2 follow-up: 4 Changed 16 years ago by
If you use the -daemon
switch, daemon(3) will be called. So... don't use that switch?
comment:3 Changed 16 years ago by
Owner: | changed from davea to charlief |
---|
Reassigning this to Charlie as it's a Mac thing.
comment:4 follow-up: 5 Changed 16 years ago by
comment:5 Changed 16 years ago by
Replying to dak180:
Replying to Nicolas:
If you use the
-daemon
switch, daemon(3) will be called. So... don't use that switch?I may be wrong, but I do not think that that is all that the '-daemon' switch does.
Even if that were the case the plist file that is included in [14490] has the switch in it and should not.
First, BOINC does follow all the rules in the document referenced by dak180. It does not call either daemon() or fork() followed by exit() or _exit().
Second, the -daemon argument does not cause BOINC to call daemon (3). The affect of arguments is determined solely by how they are used by BOINC Client's code. The -daemon argument in the plist file is correct and necessary; BOINC uses this to tell it not to exit automatically when it detects that the manager has quit or crashed.
Third, the problem arises because dak180 has modified the original plist which is installed by the Make_BOINC_Service.sh script available on the BOINC web site. The original script works correctly. He has added the KeepAlive? tag, which has introduced this problem.
However, the KeepAlive? tag should work. I'm investigating this issue. It seems that even though launchd does properly launch BOINC at system boot, it fails to recognize that it is running after that and tries to launch it again with the KeepAlive? tag. I've also noticed that launchctl stop edu.berkeley.boinc
doesn't work properly; I suspect these issues are related.
I'll update this ticket when I have more information.
comment:6 Changed 16 years ago by
Keywords: | OSX added; OS X removed |
---|
comment:7 Changed 16 years ago by
Keywords: | daemon added |
---|
comment:8 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [16565]) client: Fix error from changeset 14415 which caused Mac client to call daemon() if it was passed -daemon argument, causing problems using launchd with KeepAlive? option; fixes #782.
launchd plist file (10.5 Only)