projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- More porting to FreeBSD and Solaris.
[tinc]
/
src
/
tincd.c
diff --git
a/src/tincd.c
b/src/tincd.c
index
0b02aad
..
18791cc
100644
(file)
--- a/
src/tincd.c
+++ b/
src/tincd.c
@@
-17,7
+17,7
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: tincd.c,v 1.10.4.3
0 2000/11/16 22:12:23 zarq
Exp $
+ $Id: tincd.c,v 1.10.4.3
4 2000/11/22 19:14:09 guus
Exp $
*/
#include "config.h"
*/
#include "config.h"
@@
-64,6
+64,7
@@
#include "conf.h"
#include "net.h"
#include "netutl.h"
#include "conf.h"
#include "net.h"
#include "netutl.h"
+#include "process.h"
#include "protocol.h"
#include "subnet.h"
#include "protocol.h"
#include "subnet.h"
@@
-93,11
+94,6
@@
char **g_argv; /* a copy of the cmdline arguments */
char **environment; /* A pointer to the environment on
startup */
char **environment; /* A pointer to the environment on
startup */
-void cleanup_and_exit(int);
-int kill_other(void);
-void make_names(void);
-int write_pidfile(void);
-
static struct option const long_options[] =
{
{ "config", required_argument, NULL, 'c' },
static struct option const long_options[] =
{
{ "config", required_argument, NULL, 'c' },
@@
-247,7
+243,7
@@
void make_names(void)
if(netname)
{
if(!pidfilename)
if(netname)
{
if(!pidfilename)
- asprintf(&pidfilename,
"/var
/run/tinc.%s.pid", netname);
+ asprintf(&pidfilename,
LOCALSTATEDIR "
/run/tinc.%s.pid", netname);
if(!confbase)
asprintf(&confbase, "%s/tinc/%s", CONFDIR, netname);
else
if(!confbase)
asprintf(&confbase, "%s/tinc/%s", CONFDIR, netname);
else
@@
-258,7
+254,7
@@
void make_names(void)
else
{
if(!pidfilename)
else
{
if(!pidfilename)
- pidfilename =
"/var
/run/tinc.pid";
+ pidfilename =
LOCALSTATEDIR "
/run/tinc.pid";
if(!confbase)
asprintf(&confbase, "%s/tinc", CONFDIR);
if(!identname)
if(!confbase)
asprintf(&confbase, "%s/tinc", CONFDIR);
if(!identname)
@@
-320,6
+316,8
@@
main(int argc, char **argv, char **envp)
if(read_server_config())
return 1;
if(read_server_config())
return 1;
+ init_processes();
+
if(detach())
exit(0);
if(detach())
exit(0);