version 1.20, 2004/09/17 12:32:11 |
version 1.21, 2005/02/28 12:53:44 |
|
|
/* $OpenXM: OpenXM/src/kxx/oxmain.c,v 1.19 2004/09/17 08:46:10 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/kxx/oxmain.c,v 1.20 2004/09/17 12:32:11 takayama Exp $ */ |
/* nullserver01 */ |
/* nullserver01 */ |
#include <stdio.h> |
#include <stdio.h> |
#include <fcntl.h> |
#include <fcntl.h> |
Line 37 static void errorToStartEngine(void); |
|
Line 37 static void errorToStartEngine(void); |
|
static int findOxServer(char *server); |
static int findOxServer(char *server); |
static void couldNotFind(char *s); |
static void couldNotFind(char *s); |
/* gcc -v -c hoge.c */ |
/* gcc -v -c hoge.c */ |
|
static void mywait(); |
|
|
void *sGC_malloc(int n) { |
void *sGC_malloc(int n) { |
return (void *)malloc(n); |
return (void *)malloc(n); |
Line 326 parentServerMain(int fdControl, int fdStream) { |
|
Line 327 parentServerMain(int fdControl, int fdStream) { |
|
extern OxTerminateMode; |
extern OxTerminateMode; |
extern void myServerExit(); |
extern void myServerExit(); |
|
|
|
signal(SIGCHLD,mywait); |
if (OxTerminateMode) { |
if (OxTerminateMode) { |
/* |
/* |
OxTerminateMode cannot be used if you run ox by xterm -exec ox ... |
OxTerminateMode cannot be used if you run ox by xterm -exec ox ... |
Line 482 static void couldNotFind(char *s) { |
|
Line 484 static void couldNotFind(char *s) { |
|
} |
} |
|
|
|
|
|
static void mywait() { |
|
int status; |
|
int pid; |
|
int i,j; |
|
/* signal(SIGCHLD,SIG_IGN); */ |
|
pid = wait(&status); |
|
fprintf(stderr,"Control: child process %d is exiting.\n",pid); |
|
fprintf(stderr,"Control: Shutting down the control server.\n"); |
|
sleep(2); |
|
exit(0); |
|
} |
|
|
|
|