[X-Unix] How make launchd stop trying to launch nonexistent
program?
James Bucanek
subscriber at gloaming.com
Sat Apr 19 08:50:03 PDT 2008
Jerry Krinock <mailto:jerry at ieee.org> wrote (Friday, April 18,
2008 11:00 PM -0700):
>On 2008 Apr, 17, at 8:29, James Bucanek wrote:
>
>>For the record, the correct way of removing a .plist is use
>>'launchctl unload <path/to/.plist>'.
>>
>>If you still have the .plist you can probably stop the job
>>using 'launchctl remove <joblabel>' (look in the .plist file
>>to find the <label> property). If you don't, just restart the system.
>
>I know I tried subcommands 'remove' and 'stop' yesterday, and neither work. I tried 'unload' today with the -w option and it worked.
Another complicating issue are the various bootstrap namespaces
and sessions. When you issue a remove or stop command, you have
to target the correct instance of launchd (per-user or root),
and in some situations you must specify the correct session type
using the -S <sessiontype> option. For example, attempting to
stop a job using 'sudo launchctl stop jobtitle' will have not
effect if the job is a per-user agent, because you sent the
command to the root launchd daemon.
You can use the list command to explore what jobs are running in
a particular instance of launchd.
--
James Bucanek
More information about the X-Unix
mailing list