Remove the old school daemon option

This commit is contained in:
angt
2016-01-18 16:09:29 +01:00
parent 3649e46b03
commit 219384b7e5

View File

@@ -1100,7 +1100,6 @@ int main (int argc, char **argv)
{ "buffer-size", &buffer_size, option_long }, { "buffer-size", &buffer_size, option_long },
{ "noquickack", NULL, option_option }, { "noquickack", NULL, option_option },
{ "retry", &retry_opts, option_option }, { "retry", &retry_opts, option_option },
{ "daemon", NULL, option_option },
{ "statefile", &statefile, option_str }, { "statefile", &statefile, option_str },
{ "timeout", &user_timeout, option_long }, { "timeout", &user_timeout, option_long },
{ "debug", NULL, option_option }, { "debug", NULL, option_option },
@@ -1184,20 +1183,6 @@ int main (int argc, char **argv)
if (gt_setup_secretkey(&ctx, keyfile)) if (gt_setup_secretkey(&ctx, keyfile))
return 1; return 1;
if (option_is_set(opts, "daemon")) {
switch (fork()) {
case -1:
perror("fork");
return 1;
case 0:
if (setsid()==-1)
perror("setsid");
break;
default:
_exit(0);
}
}
if (state_init(statefile)) if (state_init(statefile))
return 1; return 1;