X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fprocess.c;h=1ec450cd0d4bbb00961a8d5b0ab1f63e17f5a7e1;hb=d772289f6d6adfb8932658b533349d43f08ec326;hp=09fd63e1071a0da957a44d9eff04acb1f16b72b1;hpb=103543aa2c15d9f1e2aa313a2e593a7524cce484;p=tinc diff --git a/src/process.c b/src/process.c index 09fd63e1..1ec450cd 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-2009 Guus Sliepen + 2000-2011 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 @@ -40,7 +40,9 @@ extern char *identname; extern char **g_argv; extern bool use_logfile; -sigset_t emptysigset; +#ifndef HAVE_MINGW +static sigset_t emptysigset; +#endif static void memory_full(int size) { logger(LOG_ERR, "Memory exhausted (couldn't allocate %d bytes), exitting.", size); @@ -261,7 +263,7 @@ bool detach(void) { bool execute_script(const char *name, char **envp) { #ifdef HAVE_SYSTEM int status, len; - char *scriptname, *p; + char *scriptname; int i; #ifndef HAVE_MINGW @@ -302,7 +304,7 @@ bool execute_script(const char *name, char **envp) { for(i = 0; envp[i]; i++) { char *e = strchr(envp[i], '='); if(e) { - p = alloca(e - envp[i] + 1); + char p[e - envp[i] + 1]; strncpy(p, envp[i], e - envp[i]); p[e - envp[i]] = '\0'; putenv(p); @@ -385,6 +387,7 @@ static struct { {SIGILL, fatal_signal_handler}, {SIGPIPE, ignore_signal_handler}, {SIGCHLD, ignore_signal_handler}, + {SIGABRT, SIG_DFL}, {0, NULL} }; #endif