Services and daemons

On traditional UNIX systems, a daemon is a process that runs for an extended period of time, but does not have a controlling terminal. A Windows service is a background process that is similar to a daemon process. You can run daemons directly on the Interix subsystem, or you can port daemons to run as Windows services.

The chief advantage of running as a service is that the service runs logged on as a Windows user. This allows you to control the privileges and permissions granted to the service, and, when it is logged on with a domain account, enables the service to access Windows network resources. Unlike traditional UNIX daemons, however, Windows services cannot use such mechanisms as fork(2) and exit(3) to create a background process. This might make it difficult to port a daemon to run as a service.

This section covers: