--- ray/src/util/ranimate.c 2005/01/18 03:59:41 2.48 +++ ray/src/util/ranimate.c 2005/09/12 14:40:14 2.50 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: ranimate.c,v 2.48 2005/01/18 03:59:41 greg Exp $"; +static const char RCSid[] = "$Id: ranimate.c,v 2.50 2005/09/12 14:40:14 schorsch Exp $"; #endif /* * Radiance animation control program @@ -22,6 +22,7 @@ static const char RCSid[] = "$Id: ranimate.c,v 2.48 20 #include #include "platform.h" +#include "rtprocess.h" #include "paths.h" #include "standard.h" #include "view.h" @@ -32,7 +33,9 @@ static const char RCSid[] = "$Id: ranimate.c,v 2.48 20 #define DEF_NBLUR 5 #endif /* default remote shell */ -#define REMSH "rsh" +#ifndef REMSH +#define REMSH "ssh" +#endif /* input variables (alphabetical by name) */ #define ANIMATE 0 /* animation command */ #define ARCHIVE 1 /* archiving command */ @@ -92,7 +95,7 @@ VARIABLE vv[] = { /* variable-value pairs */ struct { char host[64]; /* control host name */ - int pid; /* control process id */ + RT_PID pid; /* control process id */ char cfname[128]; /* control file name */ int rnext; /* next frame to render */ int fnext; /* next frame to filter */ @@ -116,7 +119,7 @@ char arcargs[10240]; /* files to archive */ char *arcfirst, *arcnext; /* pointers to first and next argument */ struct pslot { - int pid; /* process ID (0 if empty) */ + RT_PID pid; /* process ID (0 if empty) */ int fout; /* output frame number */ int (*rcvf)(); /* recover function */ } *pslot; /* process slots */ @@ -125,7 +128,7 @@ int npslots; /* number of process slots */ #define phostname(ps) ((ps)->hostname[0] ? (ps)->hostname : astat.host) PSERVER *lastpserver; /* last process server with error */ -static struct pslot * findpslot(int pid); +static struct pslot * findpslot(RT_PID pid); static void checkdir(void); static VIEW * getview(int n); @@ -139,7 +142,7 @@ static int rmfile(char *fn); static int runcom(char *cs); static int pruncom(char *com, char *ppins, int maxcopies); static void bwait(int ncoms); -static int bruncom(char *com, int fout, int (*rf)()); +static RT_PID bruncom(char *com, int fout, int (*rf)()); static int serverdown(void); static pscompfunc donecom; static int countviews(void); @@ -1190,7 +1193,7 @@ getexp(int n) /* get exposure for nth frame */ static struct pslot * -findpslot(int pid) /* find or allocate a process slot */ +findpslot(RT_PID pid) /* find or allocate a process slot */ { register struct pslot *psempty = NULL; register int i; @@ -1264,14 +1267,14 @@ serverdown(void) /* check status of last process ser } -static int +static RT_PID bruncom( /* run a command in the background */ char *com, int fout, int (*rf)() ) { - int pid; + RT_PID pid; register struct pslot *psl; if (noaction) { @@ -1284,7 +1287,7 @@ int (*rf)() bwait(1); if (!silent) { /* echo command */ PSERVER *ps; - int psn = pid; + RT_PID psn = pid; ps = findjob(&psn); printf("\t%s\n", com); printf("\tProcess started on %s\n", phostname(ps));