| 133 | | * On Linux we'll fork once more at the end of it all just to be sure that |
|---|
| 134 | | * we're not leaving any zombies behind. The SIGHUP stuff is ignored because |
|---|
| 135 | | * the parent may throw us one before we get to the setsid stuff one some |
|---|
| 136 | | * systems (BSD). |
|---|
| | 133 | * This means: |
|---|
| | 134 | * - fork once and become session leader (using setsid(2)) in |
|---|
| | 135 | * order to detach from the controlling tty and make ourselves safe |
|---|
| | 136 | * from Ctrl-C. The fork is required because the call to setsid will |
|---|
| | 137 | * fail if we were already session leader. |
|---|
| | 138 | * - On Linux, fork again in order to become a non-leader member of the |
|---|
| | 139 | * session, as the leader will attach to any tty it opens, accidentally |
|---|
| | 140 | * or otherwise (Sys V sematics). |
|---|
| | 141 | * - The SIGHUP stuff is ignored because the parent may throw us one |
|---|
| | 142 | * before we get to the setsid stuff one some systems (BSD). |
|---|