16 |
|
char *errs; /* error output */ |
17 |
|
int elen; /* error output length */ |
18 |
|
int (*cf)(); /* completion callback function */ |
19 |
< |
} PROC; /* process slot */ |
19 |
> |
} NETPROC; /* process slot (name PROC conflicts with Windows) */ |
20 |
|
|
21 |
|
/* Callback function cf above passed process server, slot number and status */ |
22 |
|
|
26 |
|
char directory[128]; /* remote execution directory */ |
27 |
|
char username[32]; /* remote user ID */ |
28 |
|
short nprocs; /* number of allocated process slots */ |
29 |
< |
PROC proc[1]; /* process slot(s) (must be last in struct) */ |
29 |
> |
NETPROC proc[1]; /* process slot(s) (must be last in struct) */ |
30 |
|
} PSERVER; /* process server */ |
31 |
|
|
32 |
|
extern PSERVER *pslist; /* global process server list */ |
33 |
|
|
34 |
|
extern PSERVER *addpserver(char *host, char *dir, char *usr, int np); |
35 |
+ |
extern void delpserver(PSERVER *ps); |
36 |
|
extern PSERVER *findjob(int *pnp); |
37 |
+ |
typedef int pscompfunc(PSERVER *ps, int pn, int status); |
38 |
+ |
extern int startjob(PSERVER *ps, char *command, pscompfunc *compf); |
39 |
+ |
extern int wait4job(PSERVER *ps, int pid); |
40 |
|
|
37 |
– |
extern char *myhostname(void); |
41 |
|
|
42 |
|
#define LHOSTNAME "localhost" /* accepted name for local host */ |
43 |
|
|