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

Comparing ray/src/common/process.c (file contents):
Revision 2.3 by greg, Thu Apr 1 11:08:05 1993 UTC vs.
Revision 2.4 by greg, Fri Apr 16 10:26:45 1993 UTC

# Line 25 | Line 25 | static char SCCSid[] = "$SunId$ LBL";
25  
26   #include  "vfork.h"
27  
28 + #ifndef BSD
29 + #include  <errno.h>
30 + #endif
31  
32 +
33   int
34   open_process(pd, av)            /* open communication to separate process */
35   int     pd[3];
# Line 101 | Line 105 | char   *bpos;
105   int     siz;
106   {
107          register int    cc = 0, nrem = siz;
108 <
108 > retry:
109          while (nrem > 0 && (cc = read(fd, bpos, nrem)) > 0) {
110                  bpos += cc;
111                  nrem -= cc;
112          }
113 <        if (cc < 0)
113 >        if (cc < 0) {
114 > #ifndef BSD
115 >                if (errno == EINTR)     /* we were interrupted! */
116 >                        goto retry;
117 > #endif
118                  return(cc);
119 +        }
120          return(siz-nrem);
121   }
122  
# Line 119 | Line 128 | char   *bpos;
128   int     siz;
129   {
130          register int    cc = 0, nrem = siz;
131 <
131 > retry:
132          while (nrem > 0 && (cc = write(fd, bpos, nrem)) > 0) {
133                  bpos += cc;
134                  nrem -= cc;
135          }
136 <        if (cc < 0)
136 >        if (cc < 0) {
137 > #ifndef BSD
138 >                if (errno == EINTR)     /* we were interrupted! */
139 >                        goto retry;
140 > #endif
141                  return(cc);
142 +        }
143          return(siz-nrem);
144   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines