| 1 | //go:build !windows |
| 2 | |
| 3 | package main |
| 4 | |
| 5 | import ( |
| 6 | "os/exec" |
| 7 | "syscall" |
| 8 | ) |
| 9 | |
| 10 | // detachShellProcess gives the shell its own session so the terminal that |
| 11 | // launched the bootstrap cannot hang it up after the bootstrap exits. |
| 12 | func detachShellProcess(cmd *exec.Cmd) { |
| 13 | cmd.SysProcAttr = &syscall.SysProcAttr{Setsid: true} |
| 14 | } |
| 15 |