( airween | 2019. 06. 11., k – 12:35 )

Én ebben a könyvben olvastam róla először:

Advanced Programming in the UNIX Environment, 13.3-as pont (Coding Rules):

3. Call setsid to create a new session. The three steps listed in Section 9.5 occur.The process (a) becomes the leader of a new session, (b) becomes the leader of anew process group, and (c) is disassociated from its controlling terminal.

Under System V–based systems, some people recommend calling fork again at thispoint, terminating the parent, and continuing the daemon in the child. This guarantees that the daemon is not a session leader, which prevents it from acquiring a controlling terminal under the System V rules (Section 9.6). Alternatively, to avoid acquiring a controlling terminal, be sure to specify O_NOCTTY whenever opening a terminal device.

(466. oldal a PDF-ben)