=================================================================== RCS file: /home/cvs/OpenXM/src/kxx/oxlog.c,v retrieving revision 1.1.1.1 retrieving revision 1.11 diff -u -p -r1.1.1.1 -r1.11 --- OpenXM/src/kxx/oxlog.c 1999/10/08 02:12:13 1.1.1.1 +++ OpenXM/src/kxx/oxlog.c 2019/09/17 05:33:09 1.11 @@ -1,5 +1,8 @@ +/*$OpenXM: OpenXM/src/kxx/oxlog.c,v 1.10 2003/11/20 07:18:41 takayama Exp $*/ #include #include +#include +#include #include #include #include @@ -18,79 +21,111 @@ -ox /home/nobuki/kxx/ox_asir >& /dev/null 2 3 */ -main(int argc, char *argv[]) { - sigset_t sss; - int i; - /* char *env[2]; - env[0] = NULL;*/ - sigemptyset(&sss); - sigaddset(&sss,SIGINT); - sigprocmask(SIG_BLOCK,&sss,NULL); +static int Debug_which = 1; +extern char **environ; - if (argc == 4) { - execl(argv[1],argv[1],argv[2],argv[3],NULL); - }else if (argc == 5) { - execl(argv[1],argv[1],argv[2],argv[3],argv[4],NULL); - }else if (argc == 6) { - execl(argv[1],argv[1],argv[2],argv[3],argv[4],argv[5],NULL); - }else if (argc == 7) { - execl(argv[1],argv[1],argv[2],argv[3],argv[4],argv[5],argv[6],NULL); - }else if (argc == 8) { - execl(argv[1],argv[1],argv[2],argv[3],argv[4],argv[5],argv[6], - argv[7],NULL); - }else if (argc == 9) { - execl(argv[1],argv[1],argv[2],argv[3],argv[4],argv[5],argv[6], - argv[7],argv[8],NULL); - }else if (argc == 10) { - execl(argv[1],argv[1],argv[2],argv[3],argv[4],argv[5],argv[6], - argv[7],argv[8],argv[9],NULL); - }else if (argc == 11) { - execl(argv[1],argv[1],argv[2],argv[3],argv[4],argv[5],argv[6], - argv[7],argv[8],argv[9],argv[10],NULL); - }else if (argc == 12) { - execl(argv[1],argv[1],argv[2],argv[3],argv[4],argv[5],argv[6], - argv[7],argv[8],argv[9],argv[10],argv[11],NULL); - }else if (argc == 13) { - execl(argv[1],argv[1],argv[2],argv[3],argv[4],argv[5],argv[6], - argv[7],argv[8],argv[9],argv[10],argv[11], argv[12],NULL); - }else if (argc == 14) { - execl(argv[1],argv[1],argv[2],argv[3],argv[4],argv[5],argv[6], - argv[7],argv[8],argv[9],argv[10],argv[11], argv[12],argv[13],NULL); - }else if (argc == 15) { - execl(argv[1],argv[1],argv[2],argv[3],argv[4],argv[5],argv[6], - argv[7],argv[8],argv[9],argv[10],argv[11], argv[12],argv[13],argv[14],NULL); - }else { - fprintf(stderr,"Error in oxlog: cannot handle argc=%d\n",argc); - for (i=0; i& /dev/null\n"); - exit(10); + free(path); + tok = strtok(NULL, delim); } - fprintf(stderr,"\nError in oxlog: Failed to start the process.\n"); - for (i=0; i= 2) { + oxname = toFullPath(argv[1]); + if (oxname == NULL) { + oxname = "NULL"; + } /* Why? */ + + /* + { + int i; + i=0; + while (environ[i] != NULL) { + fprintf(stderr,"%s ",environ[i++]); + } + fprintf(stderr,"\n"); + } + */ + /* dirty workaround of the bug of xterm -iconic on XQuartz */ + for (i=2; i& /dev/null\n"); + exit(10); + } +}