cos: (Default)
[personal profile] cos
pitchfork() - daemon fork

Much like fork(), except that the new child automatically also setsid()'s and:
- Has a umask of 0 and working directory "/"
- SIGHUP set to ignore
- Gets new stdin, stdout, stderr handles, all tied to /dev/null

[ Apologizes to non-unix-geek readers. Maybe you'll like my next post. ]
Date: 2013-05-28 19:07 (UTC)

From: [identity profile] gwillen.livejournal.com
I think the concept of 'daemonforking' like this actually seems to be on the way out. It's harder to monitor the health of a process that's daemonized itself in this way. I know that djb's daemontools wants monitored processes not to do this, and I get the impression that Poettering's systemd also prefers it (since I've seen reports that it captures stdout and stderr from daemons.)

February 2025

S M T W T F S
      1
2345678
91011121314 15
16171819202122
232425262728 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 16th, 2026 15:10
Powered by Dreamwidth Studios