=================================================================== RCS file: /home/cvs/OpenXM_contrib2/fep/fep_main.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -p -r1.4 -r1.5 --- OpenXM_contrib2/fep/fep_main.c 2004/12/01 17:40:16 1.4 +++ OpenXM_contrib2/fep/fep_main.c 2005/01/18 14:20:19 1.5 @@ -2,7 +2,7 @@ #ifndef lint static char rcsid[]= -"$Id: fep_main.c,v 1.4 2004/12/01 17:40:16 ohara Exp $ (SRA)"; +"$Id: fep_main.c,v 1.5 2005/01/18 14:20:19 ohara Exp $ (SRA)"; #endif /* lint */ #include @@ -257,7 +257,11 @@ DEFAULT: commandv = &argv[1]; if (! isatty (0)) { +#if defined(__INTERIX) + execvp (*commandv, commandv); +#else execvp (*commandv, commandv, 0); +#endif perror (*commandv); exit (1); } @@ -673,6 +677,10 @@ swallow_output() #include #endif +#if defined(__INTERIX) +#define wait3(s,opt,rp) (waitpid((-1),(s),(opt))) +#endif + void catchsig(n) int n; @@ -702,7 +710,7 @@ exec_to_command(argv) */ t = open ("/dev/tty", 2); if (t >= 0) { -#ifndef __CYGWIN32__ +#if !defined(__CYGWIN32__) && !defined(__INTERIX) ioctl (t, TIOCNOTTY, (char *) 0); #endif (void) close (t); @@ -721,7 +729,11 @@ exec_to_command(argv) #elif defined(TIOCSETN) ioctl (0, TIOCSETN, (char *) & slave_ttymode); #endif +#if defined(__INTERIX) + execvp (*argv, argv); +#else execvp (*argv, argv, 0); +#endif perror (*argv); exit (1); }