X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fprocess.c;h=737a75e2a4f8dfbc9298247c3e3eb83a1458ef51;hb=8ddcad5fa1908727f68abb461b615c666616064f;hp=77454f755d05dc46481ee8cf7ca735d407302e90;hpb=a22041922f160667573e9a5ae3f4195e1668906a;p=tinc diff --git a/src/process.c b/src/process.c index 77454f75..737a75e2 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 @@ -263,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 @@ -304,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); @@ -387,6 +387,7 @@ static struct { {SIGILL, fatal_signal_handler}, {SIGPIPE, ignore_signal_handler}, {SIGCHLD, ignore_signal_handler}, + {SIGABRT, SIG_DFL}, {0, NULL} }; #endif