ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/netproc.h
Revision: 2.4
Committed: Tue Feb 25 02:47:24 2003 UTC (21 years, 1 month ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: rad3R5
Changes since 2.3: +2 -57 lines
Log Message:
Replaced inline copyright notice with #include "copyright.h"

File Contents

# Content
1 /* RCSid $Id$ */
2 /*
3 * Header file for network processing routines
4 */
5
6 #include "copyright.h"
7
8 typedef struct {
9 char *com; /* command (stored on client side) */
10 int pid; /* process ID */
11 int efd; /* standard error file descriptor */
12 char *errs; /* error output */
13 int elen; /* error output length */
14 int (*cf)(); /* completion callback function */
15 } PROC; /* process slot */
16
17 /* Callback function cf above passed process server, slot number and status */
18
19 typedef struct pserver {
20 struct pserver *next; /* next process server in main list */
21 char hostname[64]; /* remote host ID */
22 char directory[128]; /* remote execution directory */
23 char username[32]; /* remote user ID */
24 short nprocs; /* number of allocated process slots */
25 PROC proc[1]; /* process slot(s) (must be last in struct) */
26 } PSERVER; /* process server */
27
28 extern PSERVER *pslist; /* global process server list */
29
30 extern PSERVER *addpserver(), *findjob();
31
32 extern char *myhostname();
33
34 #define LHOSTNAME "localhost" /* accepted name for local host */
35
36 #define pserverOK(ps) (wait4job(ps, startjob(ps, "true", NULL)) == 0)