Mac Launch Daemon Control

Months ago I installed a player for some DRM’ed media from Hiro Media, which was having a noticeable impact on my system. I caught their daemon running in the background consuming ~10% of my CPU when I wasn’t watching any video. I couldn’t find any info on how to get rid of it, and after they didn’t answer my email requesting some information on how to uninstall it, I went and found the process, renamed it, killed it. It didn’t come back.

Today, I was having a look at /var/log/system.log (which you can see through the Console app or just via tail /var/log/system.log in a Terminal window) and I noticed this:

1
2
3
4
5
6
7
Dec 28 09:04:10 stevemac com.apple.launchd[213] (com.hiro.Daemon): Throttling respawn: Will start in 10 seconds
Dec 28 09:04:20 stevemac com.apple.launchd[213] (com.hiro.Daemon[33542]): posix_spawnp("/usr/libexec/HiroMedia/HiroDaemon", ...): No such file or directory
Dec 28 09:04:20 stevemac com.apple.launchd[213] (com.hiro.Daemon[33542]): Exited with exit code: 1
Dec 28 09:04:20 stevemac com.apple.launchd[213] (com.hiro.Daemon): Throttling respawn: Will start in 10 seconds
Dec 28 09:04:30 stevemac com.apple.launchd[213] (com.hiro.Daemon[33545]): posix_spawnp("/usr/libexec/HiroMedia/HiroDaemon", ...): No such file or directory
Dec 28 09:04:30 stevemac com.apple.launchd[213] (com.hiro.Daemon[33545]): Exited with exit code: 1
Dec 28 09:04:30 stevemac com.apple.launchd[213] (com.hiro.Daemon): Throttling respawn: Will start in 10 seconds

So this thing has been trying to launch every 10 seconds for months now. Time to do something about that.
After a bit of digging I discovered launchctl, the unified launch control tool for the Mac. In a Terminal window, run launchctl, and you get a launchd% prompt:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
launchd% help

usage: launchctl [subcommand]
    load        Load configuration files and/or directories
    unload      Unload configuration files and/or directories
    start       Start specified job
    stop        Stop specified job
    submit      Submit a job from the command line
    remove      Remove specified job
    bootstrap   Bootstrap launchd
    list        List jobs and information about jobs
    setenv      Set an environmental variable in launchd
    unsetenv    Unset an environmental variable in launchd
    getenv      Get an environmental variable from launchd
    export      Export shell settings from launchd
    limit       View and adjust launchd resource limits
    stdout      Redirect launchd's standard out to the given path
    stderr      Redirect launchd's standard error to the given path
    shutdown    Prepare for system shutdown
    singleuser  Switch to single-user mode
    getrusage   Get resource usage statistics from launchd
    log         Adjust the logging level or mask of launchd
    umask       Change launchd's umask
    bsexec      Execute a process within a different Mach bootstrap subset
    bslist      List Mach bootstrap services and optional servers
    exit        Exit the interactive invocation of launchctl
    quit        Quit the interactive invocation of launchctl
    help        This help output

launchd%

Getting rid of this evil daemon:

1
2
launchd% stop com.hiro.Daemon
launchd% remove com.hiro.Daemon

And behold, the launching stopped.

5 Responses to “Mac Launch Daemon Control”

  1. Stuart Says:

    Thanks!
    So good to rid myself of this thing!

  2. Chris Stevens Says:

    Mate you are a bloody legend, this thing has completely taken over my brand new mac.

    Now seems fixed. I owe you a beer.

  3. John Says:

    Thanks very much for that. Much appreciated. This Hiro nonsense has been annoying me for weeks!

  4. Imke Says:

    I have the same problem, I tried Terminal but it won’t except ‘remove’

    launchctl: unknown subcommand “remove”

    What else can I do?

  5. JJ Says:

    Full uninstall instructions can be found at http://www.hiro-media.com/NINEMSN/ninemsn_faq.html#15

Leave a Reply

Powered by WP Hashcash