ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/devcomm.c
(Generate patch)

Comparing ray/src/rt/devcomm.c (file contents):
Revision 2.7 by greg, Tue Feb 25 02:47:22 2003 UTC vs.
Revision 2.11 by greg, Tue Nov 11 16:24:06 2003 UTC

# Line 9 | Line 9 | static const char      RCSid[] = "$Id$";
9  
10   #include "copyright.h"
11  
12 + #include "platform.h"
13 +
14   #include "standard.h"
15  
14 #include "color.h"
15
16   #include "driver.h"
17  
18 #include "vfork.h"
19
18   #ifndef DEVPATH
19   #define DEVPATH         getenv("PATH")  /* device search path */
20   #endif
# Line 78 | Line 76 | char   *dname, *id;
76                  eputs(": not found\n");
77                  return(NULL);
78          }
79 + #ifdef RHAS_FORK_EXEC
80                                                  /* open communication pipes */
81          if (pipe(p1) == -1 || pipe(p2) == -1)
82                  goto syserr;
83 <        if ((devchild = vfork()) == 0) {        /* fork driver process */
83 >        if ((devchild = fork()) == 0) { /* fork driver process */
84                  close(p1[1]);
85                  close(p2[0]);
86                  sprintf(pin, "%d", p1[0]);
# Line 102 | Line 101 | char   *dname, *id;
101   syserr:
102          perror(dname);
103          return(NULL);
104 +
105 + #else   /* ! RHAS_FORK_EXEC */
106 +
107 +        eputs(dname);
108 +        eputs(": no fork/exec\n");
109 +        return(NULL);
110 +
111 + #endif  /* ! RHAS_FORK_EXEC */
112   }
113  
114  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines