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

Diff for /OpenXM/src/kxx/oxmain.c between version 1.23 and 1.25

version 1.23, 2006/02/25 09:11:10 version 1.25, 2006/06/05 04:40:15
Line 1 
Line 1 
 /*  $OpenXM: OpenXM/src/kxx/oxmain.c,v 1.22 2006/02/04 10:44:22 takayama Exp $  */  /*  $OpenXM: OpenXM/src/kxx/oxmain.c,v 1.24 2006/06/05 00:25:50 takayama Exp $  */
   /*  Note on IntelMac. [2006.06.05]
       SIGINT does not seem to be blocked on the rosetta emulator of ppc
       on the IntelMac's. "ox" should be universal binary.
      A dirty hack to generate a universal binary of ox is as follows.
      (1) Add -arch ppc -arch i386 to CFLAGS in src/kxx/Makefile
          and src/kan96xx/plugin/Makefile
      (2) Build ox
   */
 /* nullserver01 */  /* nullserver01 */
 #include <stdio.h>  #include <stdio.h>
 #include <fcntl.h>  #include <fcntl.h>
Line 34  int Quiet = 0;
Line 42  int Quiet = 0;
 int LocalMode = 1;  int LocalMode = 1;
 int NotifyPortnumber = 0;  int NotifyPortnumber = 0;
 int Do_not_use_control_stream_to_tell_no_server = 1;  int Do_not_use_control_stream_to_tell_no_server = 1;
   int IgnoreSIGINT = 1;
 static void errorToStartEngine(void);  static void errorToStartEngine(void);
 static int findOxServer(char *server);  static int findOxServer(char *server);
 static void couldNotFind(char *s);  static void couldNotFind(char *s);
Line 131  main(int argc, char *argv[]) {
Line 140  main(int argc, char *argv[]) {
         fprintf(stderr,"Unknown -authEncoding %s.\n",argv[i]);          fprintf(stderr,"Unknown -authEncoding %s.\n",argv[i]);
         oxmainUsage(); exit(10);          oxmainUsage(); exit(10);
       }        }
       }else if (strcmp(argv[i],"-ignoreSIGINT") == 0) {
         i++;
         if (i<argc) {
           sscanf(argv[i],"%d",&IgnoreSIGINT);
         }
     }else {      }else {
       fprintf(stderr,"Unknown option %s.\n",argv[i]);        fprintf(stderr,"Unknown option %s.\n",argv[i]);
       oxmainUsage(); exit(10);        oxmainUsage(); exit(10);
Line 316  oxmainUsage() {
Line 330  oxmainUsage() {
   fprintf(stderr,"Usage: \n");    fprintf(stderr,"Usage: \n");
   fprintf(stderr,"  ox [-ox serverprogram -host name -data portnum -control portnum -monitor]\n");    fprintf(stderr,"  ox [-ox serverprogram -host name -data portnum -control portnum -monitor]\n");
   fprintf(stderr," [-insecure -portfile fname -reverse -passControl xxxyyyzzz -passData pppqqqrrr]");    fprintf(stderr," [-insecure -portfile fname -reverse -passControl xxxyyyzzz -passData pppqqqrrr]");
   fprintf(stderr," [-finish]");    fprintf(stderr," [-finish]  [-wait seconds] [-authEncoding [file]]");
     fprintf(stderr," [-ignoreSIGINT [1|0]]");
   fprintf(stderr,"\n");    fprintf(stderr,"\n");
   fprintf(stderr,"-reverse: ox server connects to the client.\n");    fprintf(stderr,"-reverse: ox server connects to the client.\n");
   fprintf(stderr,"          The client must give a one time password to ox server to connect to the client with -pass* option.\n");    fprintf(stderr,"          The client must give a one time password to ox server to connect to the client with -pass* option.\n");
Line 456  childServerMain(int fdControl, int fdStream) {
Line 471  childServerMain(int fdControl, int fdStream) {
         res.rlim_cur = 65536000;          res.rlim_cur = 65536000;
         setrlimit(RLIMIT_STACK,&res);          setrlimit(RLIMIT_STACK,&res);
   }    }
   
     if (IgnoreSIGINT) { signal(SIGINT, SIG_IGN); fprintf(stderr,"SIGING\n");}
   
   if (PacketMonitor) {    if (PacketMonitor) {
     if (execle(ServerName,ServerName,"-monitor",NULL,environ)) {      if (execle(ServerName,ServerName,"-monitor",NULL,environ)) {
       fprintf(stderr,"%s cannot be executed with -monitor.\n",ServerName);        fprintf(stderr,"%s cannot be executed with -monitor.\n",ServerName);

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.25

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