diff options
Diffstat (limited to 'src/starter/starter.c')
-rw-r--r-- | src/starter/starter.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/starter/starter.c b/src/starter/starter.c index de8567583..a299d5671 100644 --- a/src/starter/starter.c +++ b/src/starter/starter.c @@ -224,6 +224,7 @@ int main (int argc, char **argv) unsigned long auto_update = 0; time_t last_reload; bool no_fork = FALSE; + bool attach_gdb = FALSE; /* global variables defined in log.h */ log_to_stderr = TRUE; @@ -248,6 +249,11 @@ int main (int argc, char **argv) { no_fork = TRUE; } + else if (streq(argv[i], "--attach-gdb")) + { + no_fork = TRUE; + attach_gdb = TRUE; + } else if (streq(argv[i], "--auto-update") && i+1 < argc) { auto_update = atoi(argv[++i]); @@ -571,7 +577,7 @@ int main (int argc, char **argv) DBG_log("Attempting to start pluto...") ); - if (starter_start_pluto(cfg, no_fork) == 0) + if (starter_start_pluto(cfg, no_fork, attach_gdb) == 0) { starter_whack_listen(); } @@ -606,7 +612,7 @@ int main (int argc, char **argv) DBG(DBG_CONTROL, DBG_log("Attempting to start charon...") ); - if (starter_start_charon(cfg, no_fork)) + if (starter_start_charon(cfg, no_fork, attach_gdb)) { /* schedule next try */ alarm(PLUTO_RESTART_DELAY); |