6

Is there a way to determine if an entry listed in Activity Monitor is a service (daemon) or a process (application)?

Examples:

  • Firefox (application)
  • com.apple.audio.SandboxHelper (daemon?)

Is there a good definition of what these terms (that I'm using loosely) mean in OS X?

4
  • 1
    What do you want to do, once you know the difference? Services are often essential to the parent application process. Dec 14, 2018 at 14:19
  • I'm just trying to understand the architecture.
    – craig
    Dec 14, 2018 at 14:25
  • 1
    Please can you ask a new question for Does the application need to be built in specific way (e.g. no UI, implement certain interfaces) so it can be used as a service?` Ask Different works best when each question is asked separately. Feel free to refer to other questions in your new question. Dec 14, 2018 at 14:37

2 Answers 2

7

All Processes, Hierarchically

Activity Monitor can show the process hierarchy:

Activity Monitor.app > View (menu) > All Processes, Hierarchically

The grouping shows those processes launched by another process. Typically child-process will be services of the parent. On macOS many of these child processes will be XPC instances.

Services are Processes

On macOS, daemons are processes and services are processes. In your example, com.apple.audio.SandboxHelper, this is an XPC service.

3
  • Why do all processes (except kernel_task) run as children of launchd?
    – craig
    Dec 14, 2018 at 14:32
  • 3
    This would make a great new question. The root process in macOS is launchd and Apple have decided to put almost every process launch through it. I suspect it has many benefits but those can be discussed in a new question. Dec 14, 2018 at 14:36
6

Technically speaking, anything that gets loaded and executed is a process; so a service is a process.

A service is a nuanced definition of something that gets loaded to provide a service like DHCP or DNS.

A alternative way to sum this up is all services are processes, but not all processes are services. An example would be Firefox, it's a process, but not a service - it's an application.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .