version 1.4, 2003/07/21 13:36:42 |
version 1.6, 2004/02/28 12:27:15 |
|
|
/* $OpenXM: OpenXM/src/kxx/ox100start.c,v 1.3 2003/07/21 12:41:21 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/kxx/ox100start.c,v 1.5 2003/11/20 07:18:41 takayama Exp $ */ |
/* Moved from misc-2003/07/cygwin/test.c */ |
/* Moved from misc-2003/07/cygwin/test.c */ |
#include <stdio.h> |
#include <stdio.h> |
#include <sys/types.h> |
#include <sys/types.h> |
Line 17 void *sGC_malloc(int size) { |
|
Line 17 void *sGC_malloc(int size) { |
|
return ((void *)malloc(size)); |
return ((void *)malloc(size)); |
} |
} |
|
|
|
int Quiet = 0; |
extern char **environ; |
extern char **environ; |
|
|
main(int argc,char *argv[]) { |
main(int argc,char *argv[]) { |
Line 58 main(int argc,char *argv[]) { |
|
Line 59 main(int argc,char *argv[]) { |
|
aaa = getServerEnv(serverName); |
aaa = getServerEnv(serverName); |
}else if (strcmp(argv[i],"-nox")==0) { |
}else if (strcmp(argv[i],"-nox")==0) { |
ox_pathfinderNoX(1); |
ox_pathfinderNoX(1); |
|
}else if (strcmp(argv[i],"-quiet")==0) { |
|
Quiet = 1; ox_pathfinder_quiet(); |
}else{ |
}else{ |
fprintf(stderr,"Unknown option.\n"); |
fprintf(stderr,"Unknown option.\n"); |
usage(); |
usage(); |
Line 128 static int forkExec(char **argv) { |
|
Line 131 static int forkExec(char **argv) { |
|
dup2(fileno(null),1); |
dup2(fileno(null),1); |
dup2(fileno(null),2); |
dup2(fileno(null),2); |
} |
} |
|
|
|
/* |
|
{ |
|
int i; |
|
i = 0; |
|
fprintf(stderr,"argv-----------\n"); |
|
while (argv[i] != NULL) { |
|
fprintf(stderr,"%s ",argv[i++]); |
|
} |
|
fprintf(stderr,"\n"); |
|
i = 0; |
|
fprintf(stderr,"environ-----------\n"); |
|
while (environ[i] != NULL) { |
|
fprintf(stderr,"%s ",environ[i++]); |
|
} |
|
fprintf(stderr,"\n"); |
|
} |
|
*/ |
|
|
execve(argv[0],argv,environ); |
execve(argv[0],argv,environ); |
/* This place will never be reached unless execv fails. */ |
/* This place will never be reached unless execv fails. */ |
fprintf(stderr,"forkExec fails: "); |
fprintf(stderr,"forkExec fails: "); |