projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a copy of tinc 1.0's event infrastructure.
[tinc]
/
src
/
process.c
diff --git
a/src/process.c
b/src/process.c
index
77454f7
..
c1ad81f
100644
(file)
--- a/
src/process.c
+++ b/
src/process.c
@@
-166,7
+166,7
@@
DWORD WINAPI controlhandler(DWORD request, DWORD type, LPVOID boe, LPVOID bah) {
return ERROR_CALL_NOT_IMPLEMENTED;
}
return ERROR_CALL_NOT_IMPLEMENTED;
}
-
event_loopexit(NULL
);
+
abort(
);
status.dwWaitHint = 30000;
status.dwCurrentState = SERVICE_STOP_PENDING;
SetServiceStatus(statushandle, &status);
status.dwWaitHint = 30000;
status.dwCurrentState = SERVICE_STOP_PENDING;
SetServiceStatus(statushandle, &status);
@@
-263,7
+263,7
@@
bool detach(void) {
bool execute_script(const char *name, char **envp) {
#ifdef HAVE_SYSTEM
int status, len;
bool execute_script(const char *name, char **envp) {
#ifdef HAVE_SYSTEM
int status, len;
- char *scriptname
, *p
;
+ char *scriptname;
int i;
#ifndef HAVE_MINGW
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) {
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);
strncpy(p, envp[i], e - envp[i]);
p[e - envp[i]] = '\0';
putenv(p);