support cross-compilation for windows
This commit is contained in:
@@ -330,6 +330,7 @@ int main(int argc, char **arg) {
|
||||
SETMAXBUFSIZE(params.maxbufsize);
|
||||
|
||||
signal(SIGINT, termhandler);
|
||||
#ifndef __MINGW32__
|
||||
if (params.ppid != NULL) {
|
||||
signal(SIGALRM, pidhandler);
|
||||
alarm(5);
|
||||
@@ -337,6 +338,7 @@ int main(int argc, char **arg) {
|
||||
signal(SIGALRM, handler);
|
||||
alarm(params.timeout);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (params.online) {
|
||||
if (params.dynreorder == 1)
|
||||
@@ -1769,7 +1771,9 @@ void pidhandler(int num) {
|
||||
s = (char *) malloc(sizeof(char) * (19 + strlen(params.ppid)));
|
||||
strcpy(s, "ps "); strcat(s, params.ppid); strcat(s, " >/dev/null");
|
||||
if (system(s) != 0) exit(4);
|
||||
#ifndef __MINGW32__
|
||||
signal(SIGALRM, pidhandler);
|
||||
#endif
|
||||
alarm(5);
|
||||
free(s);
|
||||
}
|
||||
|
@@ -284,6 +284,7 @@ int main(int argc, char **arg) {
|
||||
SETMAXBUFSIZE(params.maxbufsize);
|
||||
|
||||
signal(SIGINT, termhandler);
|
||||
#ifndef __MINGW32__
|
||||
if (params.ppid != NULL) {
|
||||
signal(SIGALRM, pidhandler);
|
||||
alarm(5);
|
||||
@@ -291,6 +292,7 @@ int main(int argc, char **arg) {
|
||||
signal(SIGALRM, handler);
|
||||
alarm(params.timeout);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (params.online) {
|
||||
MyManager.manager = simpleBDDinit(0);
|
||||
@@ -688,7 +690,9 @@ void pidhandler(int num) {
|
||||
s = (char *) malloc(sizeof(char) * (19 + strlen(params.ppid)));
|
||||
strcpy(s, "ps "); strcat(s, params.ppid); strcat(s, " >/dev/null");
|
||||
if (system(s) != 0) exit(4);
|
||||
#ifndef __MINGW32__
|
||||
signal(SIGALRM, pidhandler);
|
||||
#endif
|
||||
alarm(5);
|
||||
free(s);
|
||||
}
|
||||
|
Reference in New Issue
Block a user