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

Comparing ray/src/common/unix_process.c (file contents):
Revision 3.13 by greg, Fri Mar 24 12:56:12 2017 UTC vs.
Revision 3.15 by greg, Sat Dec 28 18:05:14 2019 UTC

# Line 10 | Line 10 | static const char      RCSid[] = "$Id$";
10  
11   #include "copyright.h"
12  
13 #include <sys/types.h>
13   #include <sys/wait.h>
15 #include <fcntl.h>
14   #include <stdlib.h>
15  
16   #include "rtprocess.h"
# Line 37 | Line 35 | char   *av[]
35                  return(0);
36          if (pipe(p0) < 0 || pipe(p1) < 0)
37                  return(-1);
38 <        if ((pd->pid = fork()) == 0) {  /* if child... */
38 > #ifdef BSD
39 >        if (compath != NULL)
40 >                pd->pid = vfork();      /* more efficient with exec() */
41 >        else
42 > #endif
43 >        pd->pid = fork();
44 >        if (pd->pid == 0) {             /* if child... */
45                  close(p0[1]);
46                  close(p1[0]);
47                  if (p0[0] != 0) {       /* connect p0 to stdin */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines