]> git.meshlink.io Git - meshlink/blobdiff - src/process.c
Merge branch 'master' of git://tinc-vpn.org/tinc into 1.1
[meshlink] / src / process.c
index 77454f755d05dc46481ee8cf7ca735d407302e90..737a75e2a4f8dfbc9298247c3e3eb83a1458ef51 100644 (file)
@@ -1,7 +1,7 @@
 /*
     process.c -- process management functions
     Copyright (C) 1999-2005 Ivo Timmermans,
-                  2000-2009 Guus Sliepen <guus@tinc-vpn.org>
+                  2000-2011 Guus Sliepen <guus@tinc-vpn.org>
 
     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