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

Comparing ray/src/util/netproc.c (file contents):
Revision 2.14 by greg, Tue Nov 11 16:24:06 2003 UTC vs.
Revision 2.15 by schorsch, Fri Mar 26 21:36:19 2004 UTC

# Line 11 | Line 11 | static const char      RCSid[] = "$Id$";
11   #include <signal.h>
12   #include <fcntl.h>
13   #include <unistd.h>
14 + #include <sys/wait.h>
15  
16 + #include "rtmisc.h"
17   #include "selcall.h"
18   #include "netproc.h"
19   #include "paths.h"
# Line 30 | Line 32 | static int     maxfd;          /* maximum assigned descriptor */
32  
33   extern char     *remsh;         /* externally defined remote shell program */
34  
35 + static int readerrs(int fd);
36 + static void wait4end(void);
37 + static int finishjob(PSERVER    *ps, int        pn, int status);
38  
39 < PSERVER *
40 < addpserver(host, dir, usr, np)          /* add a new process server */
41 < char    *host, *dir, *usr;
42 < int     np;
39 >
40 > extern PSERVER *
41 > addpserver(             /* add a new process server */
42 >        char    *host,
43 >        char    *dir,
44 >        char    *usr,
45 >        int     np
46 > )
47   {
48          register PSERVER        *ps;
49                                          /* allocate the struct */
# Line 103 | Line 112 | int    np;
112   }
113  
114  
115 < delpserver(ps)                          /* delete a process server */
116 < PSERVER *ps;
115 > extern void
116 > delpserver(                             /* delete a process server */
117 >        PSERVER *ps
118 > )
119   {
120          PSERVER pstart;
121          register PSERVER        *psp;
# Line 127 | Line 138 | PSERVER        *ps;
138   }
139  
140  
141 < PSERVER *
142 < findjob(pnp)                    /* find out where process is running */
143 < register int    *pnp;   /* modified */
141 > extern PSERVER *
142 > findjob(                        /* find out where process is running */
143 >        register int    *pnp    /* modified */
144 > )
145   {
146          register PSERVER        *ps;
147          register int    i;
# Line 144 | Line 156 | register int   *pnp;   /* modified */
156   }
157  
158  
159 < int
160 < startjob(ps, command, compf)    /* start a job on a process server */
161 < register PSERVER        *ps;
162 < char    *command;
163 < int     (*compf)();
159 > extern int
160 > startjob(       /* start a job on a process server */
161 >        register PSERVER        *ps,
162 >        char    *command,
163 >        pscompfunc *compf
164 > )
165   {
166          char    udirt[PATH_MAX];
167          char    *av[16];
# Line 226 | Line 239 | int    (*compf)();
239  
240  
241   static int
242 < readerrs(fd)                    /* read error output from fd */
243 < int     fd;
242 > readerrs(                       /* read error output from fd */
243 >        int     fd
244 > )
245   {
246          char    errbuf[BUFSIZ];
247          int     nr;
# Line 257 | Line 271 | int    fd;
271   }
272  
273  
274 < static
275 < wait4end()                      /* read error streams until someone is done */
274 > static void
275 > wait4end(void)                  /* read error streams until someone is done */
276   {
277          fd_set  readfds, excepfds;
278          register int    i;
# Line 280 | Line 294 | wait4end()                     /* read error streams until someone is do
294  
295  
296   static int
297 < finishjob(ps, pn, status)       /* clean up finished process */
298 < PSERVER *ps;
299 < int     pn;
300 < int     status;
297 > finishjob(      /* clean up finished process */
298 >        PSERVER *ps,
299 >        int     pn,
300 >        int     status
301 > )
302   {
303          register NETPROC        *pp;
304  
# Line 304 | Line 319 | int    status;
319   }
320  
321  
322 < int
323 < wait4job(ps, pid)               /* wait for process to finish */
324 < PSERVER *ps;
325 < int     pid;
322 > extern int
323 > wait4job(               /* wait for process to finish */
324 >        PSERVER *ps,
325 >        int     pid
326 > )
327   {
328          int     status, psn, psn2;
329          PSERVER *ps2;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines