mirror of https://github.com/ArduPilot/ardupilot
SITL: setsid() when starting JSBSim so Ctrl-C doesn't kill it in GDB
This commit is contained in:
parent
eeef28be5e
commit
7510e4d0a7
|
@ -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]);
|
||||
|
|
Loading…
Reference in New Issue