projects
/
l2tpns.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
96c8dfa
)
setsid
author
bodea
<bodea>
Fri, 5 Nov 2004 07:50:05 +0000
(07:50 +0000)
committer
bodea
<bodea>
Fri, 5 Nov 2004 07:50:05 +0000
(07:50 +0000)
l2tpns.c
patch
|
blob
|
history
diff --git
a/l2tpns.c
b/l2tpns.c
index
c4f5619
..
5a73fe5
100644
(file)
--- a/
l2tpns.c
+++ b/
l2tpns.c
@@
-4,7
+4,7
@@
// Copyright (c) 2002 FireBrick (Andrews & Arnold Ltd / Watchfront Ltd) - GPL licenced
// vim: sw=8 ts=8
// Copyright (c) 2002 FireBrick (Andrews & Arnold Ltd / Watchfront Ltd) - GPL licenced
// vim: sw=8 ts=8
-char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.4
4 2004/11/05 04:55:27
bodea Exp $";
+char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.4
5 2004/11/05 07:50:05
bodea Exp $";
#include <arpa/inet.h>
#include <assert.h>
#include <arpa/inet.h>
#include <assert.h>
@@
-2947,9
+2947,11
@@
int main(int argc, char *argv[])
switch (o)
{
case 'd':
switch (o)
{
case 'd':
- // Double fork to detach from terminal
- if (fork()) exit(0);
if (fork()) exit(0);
if (fork()) exit(0);
+ setsid();
+ freopen("/dev/null", "r", stdin);
+ freopen("/dev/null", "w", stdout);
+ freopen("/dev/null", "w", stderr);
break;
case 'v':
optdebug++;
break;
case 'v':
optdebug++;