aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-01-15 14:37:51 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-04-16 09:20:00 +0200
commit27b618422541af332b3a5876b5e6a5919236b4d3 (patch)
tree0b89f813bb5d0f2cc2ac05038c8bfe98af1c856f
parentdc3a78f0c4b6586b9a5ffb9b79712ce3130591e6 (diff)
nat: Allow to daemonize the NAT process
Add handling for the 'D' option
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c
index e70f54952..76d6577de 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c
@@ -1368,6 +1368,7 @@ static void handle_options(int argc, char **argv)
static struct option long_options[] = {
{"help", 0, 0, 'h'},
{"debug", 1, 0, 'd'},
+ {"daemonize", 0, 0, 'D'},
{"config-file", 1, 0, 'c'},
{"disable-color", 0, 0, 's'},
{"timestamp", 0, 0, 'T'},
@@ -1376,7 +1377,7 @@ static void handle_options(int argc, char **argv)
{0, 0, 0, 0}
};
- c = getopt_long(argc, argv, "hd:sTPc:m:l:",
+ c = getopt_long(argc, argv, "hd:sTPc:m:l:D",
long_options, &option_index);
if (c == -1)
break;
@@ -1392,6 +1393,9 @@ static void handle_options(int argc, char **argv)
case 'd':
log_parse_category_mask(osmo_stderr_target, optarg);
break;
+ case 'D':
+ daemonize = 1;
+ break;
case 'c':
config_file = strdup(optarg);
break;