SITL: setsid() when starting JSBSim so Ctrl-C doesn't kill it in GDB

This commit is contained in:
Peter Barker 2016-05-09 16:53:23 +10:00 committed by Andrew Tridgell
parent eeef28be5e
commit 7510e4d0a7
1 changed files with 1 additions and 0 deletions

View File

@ -182,6 +182,7 @@ bool JSBSim::start_JSBSim(void)
pid_t child_pid = fork();
if (child_pid == 0) {
// in child
setsid();
dup2(devnull, 0);
dup2(p[1], 1);
close(p[0]);