=================================================================== RCS file: /home/cvs/OpenXM/src/kxx/oxmain.c,v retrieving revision 1.22 retrieving revision 1.27 diff -u -p -r1.22 -r1.27 --- OpenXM/src/kxx/oxmain.c 2006/02/04 10:44:22 1.22 +++ OpenXM/src/kxx/oxmain.c 2016/03/30 21:34:03 1.27 @@ -1,4 +1,12 @@ -/* $OpenXM: OpenXM/src/kxx/oxmain.c,v 1.21 2005/02/28 12:53:44 takayama Exp $ */ +/* $OpenXM: OpenXM/src/kxx/oxmain.c,v 1.26 2016/03/30 09:20:40 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 */ #include #include @@ -6,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -33,11 +42,12 @@ int Quiet = 0; int LocalMode = 1; int NotifyPortnumber = 0; int Do_not_use_control_stream_to_tell_no_server = 1; +int IgnoreSIGINT = 1; static void errorToStartEngine(void); static int findOxServer(char *server); static void couldNotFind(char *s); /* gcc -v -c hoge.c */ -static void mywait(); +static void mywait(int m); void *sGC_malloc(int n) { return (void *)malloc(n); @@ -65,7 +75,8 @@ main(int argc, char *argv[]) { char *stmp; extern int OxTerminateMode; - signal(SIGHUP,SIG_IGN); /* ignore x of xterm */ + int sighup[]={SIGHUP,-1}; + block_signal(sighup); /* ignore x of xterm */ strcpy(sname,"localhost"); strcpy(ServerName,SERVERNAME); i = 1; @@ -130,6 +141,11 @@ main(int argc, char *argv[]) { fprintf(stderr,"Unknown -authEncoding %s.\n",argv[i]); oxmainUsage(); exit(10); } + }else if (strcmp(argv[i],"-ignoreSIGINT") == 0) { + i++; + if (i