--- ray/src/rt/devcomm.c 2003/02/25 02:47:22 2.7 +++ ray/src/rt/devcomm.c 2003/11/11 16:24:06 2.11 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: devcomm.c,v 2.7 2003/02/25 02:47:22 greg Exp $"; +static const char RCSid[] = "$Id: devcomm.c,v 2.11 2003/11/11 16:24:06 greg Exp $"; #endif /* * devcomm.c - communication routines for separate drivers. @@ -9,14 +9,12 @@ static const char RCSid[] = "$Id: devcomm.c,v 2.7 2003 #include "copyright.h" +#include "platform.h" + #include "standard.h" -#include "color.h" - #include "driver.h" -#include "vfork.h" - #ifndef DEVPATH #define DEVPATH getenv("PATH") /* device search path */ #endif @@ -78,10 +76,11 @@ char *dname, *id; eputs(": not found\n"); return(NULL); } +#ifdef RHAS_FORK_EXEC /* open communication pipes */ if (pipe(p1) == -1 || pipe(p2) == -1) goto syserr; - if ((devchild = vfork()) == 0) { /* fork driver process */ + if ((devchild = fork()) == 0) { /* fork driver process */ close(p1[1]); close(p2[0]); sprintf(pin, "%d", p1[0]); @@ -102,6 +101,14 @@ char *dname, *id; syserr: perror(dname); return(NULL); + +#else /* ! RHAS_FORK_EXEC */ + + eputs(dname); + eputs(": no fork/exec\n"); + return(NULL); + +#endif /* ! RHAS_FORK_EXEC */ }