[BACK]Return to ox_pathfinder.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / util

Diff for /OpenXM/src/util/ox_pathfinder.c between version 1.1 and 1.2

version 1.1, 2003/07/21 11:36:10 version 1.2, 2003/07/21 11:56:34
Line 1 
Line 1 
 /* $OpenXM$ */  /* $OpenXM: OpenXM/src/util/ox_pathfinder.c,v 1.1 2003/07/21 11:36:10 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 22  static char *get_ox_sm1_path();
Line 22  static char *get_ox_sm1_path();
 static char *get_ox_path();  static char *get_ox_path();
 static char *get_oxc_path();  static char *get_oxc_path();
 static char *get_oxlog_path();  static char *get_oxlog_path();
 static char **setOXenv();  
 static int forkExec(char **argv);  
 static void usage();  
   
   
   
 static int Verbose_get_home = 1;  static int Verbose_get_home = 1;
 static int NoX = 0;  static int NoX = 0;
   
   
   #define nomemory(a) {fprintf(stderr,"(%d) no more memory.\n",a);exit(10);}
   #define mymalloc(a)  malloc(a)
   
   int ox_pathfinderNoX(int f) {
     if (f < 0) return NoX;
     NoX = f;
     return f;
   }
   
   /* See kxx/ox100start.c for main */
   
 #define MYFORKCP_SIZE 100  #define MYFORKCP_SIZE 100
 static int Myforkchildren[MYFORKCP_SIZE];  static int Myforkchildren[MYFORKCP_SIZE];
 static int Myforkcp=0;  static int Myforkcp=0;
Line 51  static void myforkwait() {
Line 61  static void myforkwait() {
   signal(SIGCHLD,myforkwait);    signal(SIGCHLD,myforkwait);
 }  }
   
 #define nomemory(a) {fprintf(stderr,"(%d) no more memory.\n",a);exit(10);}  int oxForkExec(char **argv) {
 #define mymalloc(a)  malloc(a)  
   
 /* See kxx/ox100start.c for main. */  
   
 static int forkExec(char **argv) {  
   int pid;    int pid;
   char **eee;    char **eee;
   int m;    int m;
Line 83  static int forkExec(char **argv) {
Line 88  static int forkExec(char **argv) {
        sigaddset(&sss,SIGINT);         sigaddset(&sss,SIGINT);
        sigprocmask(SIG_BLOCK,&sss,NULL);         sigprocmask(SIG_BLOCK,&sss,NULL);
         }          }
         eee = setOXenv();  
         if (NoX) {          if (NoX) {
           FILE *null;            FILE *null;
           null = fopen("/dev/null","wb");            null = fopen("/dev/null","wb");
Line 92  static int forkExec(char **argv) {
Line 96  static int forkExec(char **argv) {
         }          }
     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,"oxForkExec fails: ");
   }    }
 }  }
   
Line 181  static void msg_get_home(int t,char *s) {
Line 185  static void msg_get_home(int t,char *s) {
   }else if (t == 2) {    }else if (t == 2) {
     fprintf(stderr,"getServerEnv(): ");      fprintf(stderr,"getServerEnv(): ");
   }else if (t == 3) {    }else if (t == 3) {
     fprintf(stderr,"setOXenv(): ");      fprintf(stderr,"?? ");
   }else if (t == 4) {    }else if (t == 4) {
     fprintf(stderr,"cygwinPathToWinPath(): ");      fprintf(stderr,"cygwinPathToWinPath(): ");
   }else if (t == 5) {    }else if (t == 5) {
Line 546  char **getServerEnv(char *oxServer) {
Line 550  char **getServerEnv(char *oxServer) {
   return aaa;    return aaa;
 }  }
   
 char **setOXenv() {  
   /* Do nothing. */  
   return NULL;  
 }  
 char **setOXenv_old() {  char **setOXenv_old() {
   char *openXM_HOME;    char *openXM_HOME;
   char *load_sm1_path;    char *load_sm1_path;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>