| version 1.10, 2015/10/10 11:29:46 |
version 1.11, 2016/03/31 05:27:34 |
|
|
| /* $OpenXM: OpenXM/src/k097/ox_k0.c,v 1.9 2013/11/07 07:29:47 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 130 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 168 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 292 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 303 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 352 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; |