2 ms·
As well as getting how "service" commands operate wrong, you are conflating a "background" process associated with a TTY with a daemon. Some "service" commands
by JdeBP 4y ago
As well as getting how "service" commands operate wrong, you are conflating a "background" process associated with a TTY with a daemon. Some "service" commands work the way that you describe. But that is actually a bug. A properly designed "service" command does not execute as some direct or indirect parent process of the eventual "httpd" process. The "service" command runs in a login session. A daemon has (at least as an intention) no association with a TTY. The daemon process runs in a context that has never been tainted by any of the various things associated with login sessions.
* http://jdebp.info./Softwares/nosh/bsd-service-command.html http://jdebp.info./Softwares/nosh/bsd-service-command.html