X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fprocess.c;h=0f399e79605dc8a7e357427beb06113cc9a45a15;hb=cc3c69c892b0dad9a6ece0a0f4ccd429a22fcbff;hp=37ba84b65e3aed922baf1ed406cab026fc4d2428;hpb=3254e75afe0ff28fed68d8682f61c184f442161d;p=tinc diff --git a/src/process.c b/src/process.c index 37ba84b6..0f399e79 100644 --- a/src/process.c +++ b/src/process.c @@ -1,7 +1,7 @@ /* process.c -- process management functions Copyright (C) 1999-2005 Ivo Timmermans, - 2000-2012 Guus Sliepen + 2000-2013 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,7 +25,9 @@ #include "control.h" #include "device.h" #include "edge.h" +#include "event.h" #include "logger.h" +#include "names.h" #include "net.h" #include "node.h" #include "process.h" @@ -37,17 +39,12 @@ bool do_detach = true; bool sigalrm = false; -extern char *identname; extern char **g_argv; extern bool use_logfile; /* Some functions the less gifted operating systems might lack... */ #ifdef HAVE_MINGW -extern char *identname; -extern char *program_name; -extern char **g_argv; - static SC_HANDLE manager = NULL; static SC_HANDLE service = NULL; static SERVICE_STATUS status = {0}; @@ -127,7 +124,7 @@ DWORD WINAPI controlhandler(DWORD request, DWORD type, LPVOID boe, LPVOID bah) { return ERROR_CALL_NOT_IMPLEMENTED; } - event_loopexit(NULL); + event_exit(); status.dwWaitHint = 30000; status.dwCurrentState = SERVICE_STOP_PENDING; SetServiceStatus(statushandle, &status);