projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix proxy-neighborsolicitation.
[tinc]
/
src
/
process.c
diff --git
a/src/process.c
b/src/process.c
index
4eb1cd8
..
b82e951
100644
(file)
--- a/
src/process.c
+++ b/
src/process.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: process.c,v 1.1.2.7
7 2003/11/27 23:24:59
guus Exp $
+ $Id: process.c,v 1.1.2.7
8 2003/12/07 14:29:02
guus Exp $
*/
#include "system.h"
*/
#include "system.h"
@@
-338,7
+338,7
@@
bool detach(void)
/* Now UPDATE the pid in the pidfile, because we changed it... */
if(!write_pid(pidfilename)) {
/* Now UPDATE the pid in the pidfile, because we changed it... */
if(!write_pid(pidfilename)) {
- fprintf(stderr, _("Could not write pidfile %s: %s\n"), pidfilename, strerror(errno));
+ fprintf(stderr, _("Could not write pid
file %s: %s\n"), pidfilename, strerror(errno));
return false;
}
#else
return false;
}
#else
@@
-431,13
+431,19
@@
bool execute_script(const char *name, char **envp)
static RETSIGTYPE sigterm_handler(int a)
{
logger(LOG_NOTICE, _("Got %s signal"), "TERM");
static RETSIGTYPE sigterm_handler(int a)
{
logger(LOG_NOTICE, _("Got %s signal"), "TERM");
- running = false;
+ if(running)
+ running = false;
+ else
+ exit(1);
}
static RETSIGTYPE sigquit_handler(int a)
{
logger(LOG_NOTICE, _("Got %s signal"), "QUIT");
}
static RETSIGTYPE sigquit_handler(int a)
{
logger(LOG_NOTICE, _("Got %s signal"), "QUIT");
- running = false;
+ if(running)
+ running = false;
+ else
+ exit(1);
}
static RETSIGTYPE fatal_signal_square(int a)
}
static RETSIGTYPE fatal_signal_square(int a)