version 1.3, 2003/07/21 12:41:21 |
version 1.6, 2004/02/28 12:27:15 |
|
|
/* $OpenXM: OpenXM/src/kxx/ox100start.c,v 1.2 2003/07/21 11:56:33 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 29 main(int argc,char *argv[]) { |
|
Line 30 main(int argc,char *argv[]) { |
|
int i; |
int i; |
char *serverName; |
char *serverName; |
|
|
|
|
/* |
/* |
if (Verbose_get_home) { |
|
printf("ostype=%s\n",getOStypes()); |
printf("ostype=%s\n",getOStypes()); |
printf("OpenXM_HOME=%s\n",getOpenXM_HOME()); |
printf("OpenXM_HOME=%s\n",getOpenXM_HOME()); |
printf("sm lib =%s\n",get_sm1_lib_path()); |
printf("sm lib =%s\n",get_sm1_lib_path()); |
printf("k0 lib =%s\n",get_k0_lib_path()); |
printf("k0 lib =%s\n",get_k0_lib_path()); |
printf("ox_asir =%s\n",get_ox_asir_path()); |
printf("ox_asir =%s\n",get_ox_asir_path()); |
} |
|
*/ |
*/ |
|
ox_pathfinderVerbose(1); |
|
|
|
|
/* Initialize parameters */ |
/* Initialize parameters */ |
serverName = NULL; |
serverName = NULL; |
aaa = NULL; |
aaa = NULL; |
Line 57 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 127 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: "); |