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.11 by schorsch, Mon Jun 30 14:59:13 2003 UTC vs.
Revision 2.13 by greg, Mon Nov 10 16:52:24 2003 UTC

# Line 5 | Line 5 | static const char      RCSid[] = "$Id$";
5   * Parallel network process handling routines
6   */
7  
8 + #include <stdlib.h>
9   #include <stdio.h>
10 + #include <string.h>
11   #include <signal.h>
12   #include <fcntl.h>
13   #include <unistd.h>
# Line 13 | Line 15 | static const char      RCSid[] = "$Id$";
15   #include "selcall.h"
16   #include "netproc.h"
17   #include "paths.h"
16 #include "vfork.h"
18  
19   PSERVER *pslist = NULL;         /* global process server list */
20  
21 < static PROC     *pindex[FD_SETSIZE];    /* process index table */
21 > static NETPROC  *pindex[FD_SETSIZE];    /* process index table */
22  
23   static char     ourhost[64];    /* this host name */
24   static char     ourdir[PATH_MAX];       /* our working directory */
# Line 29 | Line 30 | static int     maxfd;          /* maximum assigned descriptor */
30  
31   extern char     *remsh;         /* externally defined remote shell program */
32  
32 extern char     *getenv();
33  
34
34   PSERVER *
35   addpserver(host, dir, usr, np)          /* add a new process server */
36   char    *host, *dir, *usr;
# Line 41 | Line 40 | int    np;
40                                          /* allocate the struct */
41          if (np < 1)
42                  return(NULL);
43 <        ps = (PSERVER *)malloc(sizeof(PSERVER)+(np-1)*sizeof(PROC));
43 >        ps = (PSERVER *)malloc(sizeof(PSERVER)+(np-1)*sizeof(NETPROC));
44          if (ps == NULL)
45                  return(NULL);
46          if (!ourhost[0]) {              /* initialize */
# Line 232 | Line 231 | int    fd;
231   {
232          char    errbuf[BUFSIZ];
233          int     nr;
234 <        register PROC   *pp;
234 >        register NETPROC        *pp;
235                                  /* look up associated process */
236          if ((pp = pindex[fd]) == NULL)
237                  abort();                /* serious consistency error */
# Line 286 | Line 285 | PSERVER        *ps;
285   int     pn;
286   int     status;
287   {
288 <        register PROC   *pp;
288 >        register NETPROC        *pp;
289  
290          pp = ps->proc + pn;
291          if (pp->cf != NULL)                     /* client cleanup */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines