version 1.32, 2001/10/09 01:36:21 |
version 1.34, 2001/12/21 08:23:14 |
|
|
* OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY |
* OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* $OpenXM: OpenXM_contrib2/asir2000/io/ox_asir.c,v 1.31 2001/10/06 00:55:04 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/io/ox_asir.c,v 1.33 2001/10/22 09:14:35 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 712 void ox_io_init() { |
|
Line 712 void ox_io_init() { |
|
unsigned char c,rc; |
unsigned char c,rc; |
extern int I_am_server; |
extern int I_am_server; |
|
|
/* XXX : ssh forwards stdin to a remote host */ |
/* XXX : ssh forwards stdin to a remote host on PC Unix */ |
#if !defined(VISUAL) |
#if defined(linux) |
int i; |
|
#if defined(linux) || defined(__NeXT__) || defined(ultrix) |
|
#include <sys/param.h> |
#include <sys/param.h> |
|
int i; |
|
|
close(0); |
close(0); |
for ( i = 5; i < NOFILE; i++ ) |
for ( i = 5; i < NOFILE; i++ ) |
close(i); |
close(i); |
#else |
#elif defined(__FreeBSD__) |
#include <sys/resource.h> |
#include <sys/resource.h> |
|
int i; |
struct rlimit rl; |
struct rlimit rl; |
|
|
getrlimit(RLIMIT_NOFILE,&rl); |
getrlimit(RLIMIT_NOFILE,&rl); |
Line 730 void ox_io_init() { |
|
Line 730 void ox_io_init() { |
|
for ( i = 5; i < rl.rlim_cur; i++ ) |
for ( i = 5; i < rl.rlim_cur; i++ ) |
close(i); |
close(i); |
#endif |
#endif |
#endif |
|
|
|
I_am_server = 1; |
I_am_server = 1; |
endian_init(); |
endian_init(); |
Line 743 void ox_io_init() { |
|
Line 742 void ox_io_init() { |
|
iofp[0].in = fdopen(3,"r"); |
iofp[0].in = fdopen(3,"r"); |
iofp[0].out = fdopen(4,"w"); |
iofp[0].out = fdopen(4,"w"); |
|
|
|
#if !defined(__CYGWIN__) |
setbuffer(iofp[0].in,(char *)malloc(LBUFSIZ),LBUFSIZ); |
setbuffer(iofp[0].in,(char *)malloc(LBUFSIZ),LBUFSIZ); |
setbuffer(iofp[0].out,(char *)malloc(LBUFSIZ),LBUFSIZ); |
setbuffer(iofp[0].out,(char *)malloc(LBUFSIZ),LBUFSIZ); |
|
#endif |
signal(SIGUSR1,ox_usr1_handler); |
signal(SIGUSR1,ox_usr1_handler); |
#endif |
#endif |
asir_OperandStackSize = BUFSIZ; |
asir_OperandStackSize = BUFSIZ; |