I compiled a tool named "Beeper", which simply calls NSBeep() every second, in an infinite loop.
I then loaded this job using launchctl:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ExitTimeOut</key>
<integer>5</integer>
<key>Label</key>
<string>beeper.plist</string>
<key>ProgramArguments</key>
<array>
<string>/Users/jk/Documents/Programming/Builds/Debug/Beeper</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
As expected, my computer begins beeping.
Note that ExitTimeOut = 5.
Expected Result: My tool should get a SIGKILL and quit beeping after 5 seconds.
Actual Result: My tool keeps executing until I kill it with other means.
What's wrong?
Thanks,
Jerry Krinock
Hi,
My application uses a launchd job. One of my users has the following appearing in his Console output.
localhost com.apple.launchd.peruser.501[240] (ZZZ.ZZZ):
Bug: launchd_core_logic.c:8873 (24108):35
Can someone let me know what it relates to?
If it's useful, the launchd plist file looks something like this (some items changed):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<true/>
<key>Label</key>
<string>ZZZ.ZZZZ</string>
<key>LowPriorityIO</key>
<true/>
<key>Nice</key>
<integer>10</integer>
<key>OnDemand</key>
<true/>
<key>Program</key>
<string>/Path/to/exec.sh</string>
<key>WatchPaths</key>
<array>
<string>/Path/to/watched/folder/</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Weekday</key>
<integer>1</integer>
<key>Hour</key>
<integer>1</integer>
<key>Minute</key>
<integer>45</integer>
</dict>
<key>ExitTimeOut</key>
<integer>0</integer>
<key>ThrottleInterval</key>
<integer>30</integer>
</dict>
</plist>
Thanks
John Maisey
----
www.nhoj.co.uk
Best wishes
John Maisey
----
www.nhoj.co.ukwww.twitter.com/johnmaiseywww.facebook.com/pages/nhojcouk/123720832915
Hi,
What happens if a launchd service is not brought down (with launchtctl
unload -w),
but instead its plist file is deleted?
And on the next system reboot, what will happen?
dreamcat4
dreamcat4(a)gmail.com