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

Diff for /OpenXM/src/kxx/oxserver00.c between version 1.16 and 1.19

version 1.16, 2004/09/17 02:42:58 version 1.19, 2015/10/08 11:49:38
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/kxx/oxserver00.c,v 1.15 2004/09/05 00:51:18 takayama Exp $ */  /* $OpenXM: OpenXM/src/kxx/oxserver00.c,v 1.18 2015/10/08 08:14:25 takayama Exp $ */
 /* nullserver01 */  /* nullserver01 */
 #include <stdio.h>  #include <stdio.h>
 #include <sys/types.h>  #include <sys/types.h>
Line 23  extern int OXprintMessage; /* print oxmessages? */
Line 23  extern int OXprintMessage; /* print oxmessages? */
 extern int Calling_ctrlC_hook;  extern int Calling_ctrlC_hook;
 extern int RestrictedMode, RestrictedMode_saved;  extern int RestrictedMode, RestrictedMode_saved;
   
 #if defined(__CYGWIN__)  #if defined(__CYGWIN__) || defined(__MSYS__)
 sigjmp_buf EnvOfChildServer;  sigjmp_buf EnvOfChildServer;
 #else  #else
 jmp_buf EnvOfChildServer;  jmp_buf EnvOfChildServer;
Line 99  nullserver(int fdStreamIn,int fdStreamOut) {
Line 99  nullserver(int fdStreamIn,int fdStreamOut) {
   ox_stream ostreamOut;    ox_stream ostreamOut;
   char sreason[1024];    char sreason[1024];
   extern void controlResetHandler();    extern void controlResetHandler();
 #if defined(__CYGWIN__)  #if defined(__CYGWIN__) || defined(__MSYS__)
   extern sigjmp_buf EnvOfStackMachine;    extern sigjmp_buf EnvOfStackMachine;
 #else  #else
   extern jmp_buf EnvOfStackMachine;    extern jmp_buf EnvOfStackMachine;
Line 131  nullserver(int fdStreamIn,int fdStreamOut) {
Line 131  nullserver(int fdStreamIn,int fdStreamOut) {
     if (PacketMonitor) fp2watch(ostreamOut,stdout);      if (PacketMonitor) fp2watch(ostreamOut,stdout);
   }    }
   
     fprintf(stderr,"Hello world.\n"); OXprintMessage = 1;
     JmpMessage = 1;
   
   aaa : ;    aaa : ;
 #if defined(__CYGWIN__)  #if defined(__CYGWIN__)
   if (sigsetjmp(EnvOfChildServer,1)) {    if (MYSIGSETJMP(EnvOfChildServer,1)) {
 #else  #else
   if (setjmp(EnvOfChildServer)) {    if (MYSETJMP(EnvOfChildServer)) {
 #endif  #endif
     fprintf(stderr,"childServerMain: jump here.\n");      fprintf(stderr,"childServerMain: jump here.\n");
     if (OxInterruptFlag == 0) {      if (OxInterruptFlag == 0) {
Line 154  nullserver(int fdStreamIn,int fdStreamOut) {
Line 157  nullserver(int fdStreamIn,int fdStreamOut) {
     signal(SIGUSR1,controlResetHandler);      signal(SIGUSR1,controlResetHandler);
   }    }
 #if defined(__CYGWIN__)  #if defined(__CYGWIN__)
   if (sigsetjmp(EnvOfStackMachine,1)) {    if (MYSIGSETJMP(EnvOfStackMachine,1)) {
 #else  #else
   if (setjmp(EnvOfStackMachine)) {    if (MYSETJMP(EnvOfStackMachine)) {
 #endif  #endif
     fprintf(stderr,"childServerMain: jump here by EnvOfStackMachine or timeout.\n");      fprintf(stderr,"childServerMain: jump here by EnvOfStackMachine or timeout.\n");
     if (OxInterruptFlag == 0) {      if (OxInterruptFlag == 0) {
Line 364  nullserver_simplest(int fd) {
Line 367  nullserver_simplest(int fd) {
   int c;    int c;
   while(1) {    while(1) {
     c = readOneByte(fd);      c = readOneByte(fd);
     if (c == '@') { return; }      if (c == '@') { return 0; }
   }    }
 }  }
   
Line 380  void controlResetHandler(sig)
Line 383  void controlResetHandler(sig)
     return;      return;
   }else{    }else{
     (void) traceShowStack(); traceClearStack();      (void) traceShowStack(); traceClearStack();
 #if defined(__CYGWIN__)  #if defined(__CYGWIN__) || defined(__MSYS__)
     siglongjmp(EnvOfChildServer,2); /* returns 2 for ctrl-C */      MYSIGLONGJMP(EnvOfChildServer,2); /* returns 2 for ctrl-C */
 #else  #else
     longjmp(EnvOfChildServer,2); /* returns 2 for ctrl-C */      LONGJMP(EnvOfChildServer,2); /* returns 2 for ctrl-C */
 #endif  #endif
   }    }
 }  }

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.19

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