2 ms·
Can someone explain why he forks the process twice? The url in the comment doesn't work.
by river_styx 18y ago
Can someone explain why he forks the process twice? The url in the comment doesn't work.
- maw 18y ago"Under SVR4, some people recommend calling fork again at this point and having the parent terminate. The second child continues as the daemon. This guarantees that the daemon is not a session leader, which prevents it from acquiring a controlling terminal under the SVR4 rules. [...]" (That's from p417 in my first edition copy of Stevens. The page number and/or the text may be different in the second edition.)