diff options
Diffstat (limited to 'src/starter/invokecharon.c')
-rw-r--r-- | src/starter/invokecharon.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/starter/invokecharon.c b/src/starter/invokecharon.c index d981f6c17..5d95305cb 100644 --- a/src/starter/invokecharon.c +++ b/src/starter/invokecharon.c @@ -201,6 +201,15 @@ int starter_start_charon (starter_config_t *cfg, bool no_fork, bool attach_gdb) default: /* father */ _charon_pid = pid; + while (attach_gdb) + { + /* wait indefinitely if gdb is attached */ + usleep(10000); + if (stat(pid_file, &stb) == 0) + { + return 0; + } + } for (i = 0; i < 500 && _charon_pid; i++) { /* wait for charon for a maximum of 500 x 20 ms = 10 s */ |