ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/netproc.h
Revision: 2.2
Committed: Wed Feb 7 16:42:40 1996 UTC (28 years, 2 months ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 2.1: +2 -0 lines
Log Message:
moved host name stuff to lib routine

File Contents

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