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

Diff for /OpenXM/src/k097/ox_k0.c between version 1.8 and 1.11

version 1.8, 2013/11/06 06:23:23 version 1.11, 2016/03/31 05:27:34
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/k097/ox_k0.c,v 1.7 2004/09/17 02:42:58 takayama Exp $ */  /* $OpenXM: OpenXM/src/k097/ox_k0.c,v 1.10 2015/10/10 11:29:46 takayama Exp $ */
 #include <stdio.h>  #include <stdio.h>
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/socket.h>  #include <sys/socket.h>
Line 7 
Line 7 
 #include <netdb.h>  #include <netdb.h>
 #include <signal.h>  #include <signal.h>
 #include <setjmp.h>  #include <setjmp.h>
   #include <string.h>
   #include <stdlib.h>
 /* -lnsl -lsocket /usr/ucblib/libucb.a */  /* -lnsl -lsocket /usr/ucblib/libucb.a */
 #include "../kxx/ox_kan.h"  #include "../kxx/ox_kan.h"
 #include "../kxx/serversm.h"  #include "../kxx/serversm.h"
Line 128  nullserver(int fdStreamIn,int fdStreamOut) {
Line 130  nullserver(int fdStreamIn,int fdStreamOut) {
     Calling_ctrlC_hook = 0;      Calling_ctrlC_hook = 0;
         KSexecuteString(" (Computation is interrupted.) ");          KSexecuteString(" (Computation is interrupted.) ");
         InSendmsg2 = 0;          InSendmsg2 = 0;
     signal(SIGUSR1,controlResetHandler); goto aaa;      mysignal(SIGUSR1,controlResetHandler); goto aaa;
   } else {    } else {
     if (JmpMessage) fprintf(stderr,"Set EnvOfChildServer.\n");      if (JmpMessage) fprintf(stderr,"Set EnvOfChildServer.\n");
     signal(SIGUSR1,controlResetHandler);      mysignal(SIGUSR1,controlResetHandler);
   }    }
 #if defined(__CYGWIN__)  #if defined(__CYGWIN__)
   if (sigsetjmp(EnvOfStackMachine,1)) {    if (sigsetjmp(EnvOfStackMachine,1)) {
Line 166  nullserver(int fdStreamIn,int fdStreamOut) {
Line 168  nullserver(int fdStreamIn,int fdStreamOut) {
     }      }
     Calling_ctrlC_hook = 0;      Calling_ctrlC_hook = 0;
     InSendmsg2=0;      InSendmsg2=0;
     signal(SIGUSR1,controlResetHandler); goto aaa ;      mysignal(SIGUSR1,controlResetHandler); goto aaa ;
   } else {    } else {
     if (JmpMessage) fprintf(stderr,"Set EnvOfStackMachine.\n");      if (JmpMessage) fprintf(stderr,"Set EnvOfStackMachine.\n");
     if (signal(SIGUSR1,SIG_IGN) != SIG_IGN) {      if (mysignal(SIGUSR1,SIG_IGN) != SIG_IGN) {
       signal(SIGUSR1,controlResetHandler);        mysignal(SIGUSR1,controlResetHandler);
     }      }
   }    }
   
Line 290  nullserverCommand(ox_stream ostreamIn,ox_stream ostrea
Line 292  nullserverCommand(ox_stream ostreamIn,ox_stream ostrea
     if (message) fprintf(stderr," executeStringByLocalParser\n");      if (message) fprintf(stderr," executeStringByLocalParser\n");
     OxCritical = 0;      OxCritical = 0;
     iresult = K0_executeStringByLocalParser();      iresult = K0_executeStringByLocalParser();
     OxCritical = 1; signal(SIGUSR1,controlResetHandler);      OxCritical = 1; mysignal(SIGUSR1,controlResetHandler);
     if (iresult < 0) {      if (iresult < 0) {
       emsg = Sm1_popErrorMessage("executeString: ");        emsg = Sm1_popErrorMessage("executeString: ");
       Sm1_pushError2(SerialCurrent,-1,emsg);        Sm1_pushError2(SerialCurrent,-1,emsg);
Line 301  nullserverCommand(ox_stream ostreamIn,ox_stream ostrea
Line 303  nullserverCommand(ox_stream ostreamIn,ox_stream ostrea
     if (message) fprintf(stderr," executeFunction\n");      if (message) fprintf(stderr," executeFunction\n");
     OxCritical = 0;      OxCritical = 0;
     iresult = K0_executeStringByLocalParser();      iresult = K0_executeStringByLocalParser();
     OxCritical = 1; signal(SIGUSR1,controlResetHandler);      OxCritical = 1; mysignal(SIGUSR1,controlResetHandler);
     if (iresult < 0) {      if (iresult < 0) {
       emsg = Sm1_popErrorMessage("executeFunction: ");        emsg = Sm1_popErrorMessage("executeFunction: ");
       Sm1_pushError2(SerialCurrent,-1,emsg);        Sm1_pushError2(SerialCurrent,-1,emsg);
Line 350  nullserver_simplest(int fd) {
Line 352  nullserver_simplest(int fd) {
 void controlResetHandler(sig)  void controlResetHandler(sig)
      int sig;       int sig;
 {  {
   signal(sig,SIG_IGN);    mysignal(sig,SIG_IGN);
   cancelAlarm();    cancelAlarm();
   fprintf(stderr,"From controlResetHandler. OxCritical = %d\n",OxCritical);    fprintf(stderr,"From controlResetHandler. OxCritical = %d\n",OxCritical);
   OxInterruptFlag = 1;    OxInterruptFlag = 1;

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.11

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