*** ../netlib/pvm3.2.4/gexamples/gexamp.c	Tue Jun  1 14:16:22 1993
--- gexamples/gexamp.c	Tue Nov 30 10:40:32 1993
***************
*** 36,46 ****
  	mygid = pvm_joingroup(gp);
  
  	fprintf(stderr, "%s 0x%x %d\n", gp, mytid, mygid);
  
  	/* if I'm the first to join then start the others */
  	if (mygid == 0) {
  		/* start a bunch of children */
!     	pvm_spawn(argv[0], argv+1, PvmTaskDefault, "", nproc-1, ctid);
  		/* check them */
  		for (i = 0; i < nproc-1; i++)
  			fprintf(stderr, "0x%x\n", ctid[i]);
--- 36,50 ----
  	mygid = pvm_joingroup(gp);
  
  	fprintf(stderr, "%s 0x%x %d\n", gp, mytid, mygid);
+ 	if (mygid < 0) {
+ 		pvm_exit();
+ 		return -1;
+ 	}
  
  	/* if I'm the first to join then start the others */
  	if (mygid == 0) {
  		/* start a bunch of children */
!     	pvm_spawn(gp, argv+1, PvmTaskDefault, "", nproc-1, ctid);
  		/* check them */
  		for (i = 0; i < nproc-1; i++)
  			fprintf(stderr, "0x%x\n", ctid[i]);
*** ../netlib/pvm3.2.4/libfpvm/HPPA/Makefile	Wed Sep 22 16:10:04 1993
--- libfpvm/HPPA/Makefile	Tue Nov 30 10:45:48 1993
***************
*** 58,63 ****
--- 58,64 ----
  	pvmfsetsbuf.o \
  	pvmfspawn.o \
  	pvmftasks.o \
+ 	pvmftidtoh.o \
  	pvmfunpack.o
  
  default:	libfpvm3.a
***************
*** 275,280 ****
--- 276,286 ----
  	$(MX) $(M4FILE) $(SDIR)/pvmftasks.m4 $(RWBSPECIAL) >> pvmftasks.c
  	$(CC) $(CFLAGS) pvmftasks.c
  	$(RM) pvmftasks.c
+ pvmftidtoh.o:	$(SDIR)/pvmftidtoh.m4 $(M4FILE) $(SDIR)/../src/bfunc.h
+ 	$(M4) $(M4FILE) $(SDIR)/pvmftidtoh.m4 > pvmftidtoh.c
+ 	$(MX) $(M4FILE) $(SDIR)/pvmftidtoh.m4 $(RWBSPECIAL) >> pvmftidtoh.c
+ 	$(CC) $(CFLAGS) pvmftidtoh.c
+ 	$(RM) pvmftidtoh.c
  pvmfunpack.o:	$(SDIR)/pvmfunpack.m4 $(M4FILE)
  	$(M4) $(M4FILE) $(SDIR)/pvmfunpack.m4 > pvmfunpack.c
  	$(MX) $(M4FILE) $(SDIR)/pvmfunpack.m4 $(RWBSPECIAL) >> pvmfunpack.c
*** ../netlib/pvm3.2.4/libfpvm/Makefile.aimk	Wed Sep 22 16:10:04 1993
--- libfpvm/Makefile.aimk	Mon Nov 29 14:52:39 1993
***************
*** 50,55 ****
--- 50,56 ----
  	pvmfsetsbuf.o \
  	pvmfspawn.o \
  	pvmftasks.o \
+ 	pvmftidtoh.o \
  	pvmfunpack.o
  
  default:	libfpvm3.a
***************
*** 228,233 ****
--- 229,238 ----
  	$(M4) $(M4FILE) $(SDIR)/pvmftasks.m4 > pvmftasks.c
  	$(CC) $(CFLAGS) pvmftasks.c
  	$(RM) pvmftasks.c
+ pvmftidtoh.o:	$(SDIR)/pvmftidtoh.m4 $(M4FILE) $(SDIR)/../src/bfunc.h
+ 	$(M4) $(M4FILE) $(SDIR)/pvmftidtoh.m4 > pvmftidtoh.c
+ 	$(CC) $(CFLAGS) pvmftidtoh.c
+ 	$(RM) pvmftidtoh.c
  pvmfunpack.o:	$(SDIR)/pvmfunpack.m4 $(M4FILE)
  	$(M4) $(M4FILE) $(SDIR)/pvmfunpack.m4 > pvmfunpack.c
  	$(CC) $(CFLAGS) pvmfunpack.c
*** /dev/null	Tue Nov 30 19:06:10 1993
--- libfpvm/pvmftidtoh.m4	Mon Nov 29 14:50:12 1993
***************
*** 0 ****
--- 1,11 ----
+ 
+ #include "pvm3.h"
+ #include "pvm_consts.h"
+ 
+ void
+ FUNCTION(pvmftidtohost) ARGS(`tid, dtid')
+ int *dtid, *tid;
+ {
+     *dtid = pvm_tidtohost(*tid);
+ }
+ 
*** ../netlib/pvm3.2.4/patches/Contents	Wed Oct 27 13:41:14 1993
--- patches/Contents	Tue Nov 30 19:05:27 1993
***************
*** 1,4 ****
--- 1,45 ----
  
+ patch #5
+ version:
+     3.2.4 -> 3.2.5
+     interoperable with v 3.2.[0-4].
+ files:
+     patch  gexamples/gexamp.c
+     patch  libfpvm/HPPA/Makefile
+     patch  libfpvm/Makefile.aimk
+     create libfpvm/pvmftidtoh.m4
+     patch  patches/Contents
+     patch  pvmgs/pvm_gsulib.c
+     patch  src/Makefile.aimk
+     patch  src/global.h
+     patch  src/host.c
+     patch  src/lpvm.c
+     patch  src/lpvmgen.c
+     patch  src/patchlevel.h
+     patch  src/pvmlog.c
+     patch  src/startup.c
+     patch  src/task.c
+     patch  src/tdpro.c
+ what:
+     . set task-task socket buffer size and tcp nodelay to improve
+       throughput and eliminate 4k message length speed bump.
+     . added slave pvmds not in hostfile now get options from last
+       '*' line in hostfile.
+     . slave pvmd startup command is now handed to rsh as a single arg
+       instead of several (this broke on LINUX machines).
+     . fixed bug in group library that caused calls to f.e. joingroup()
+       to hang if group server executable (pvmgs) not installed.
+     . fixed a few bugs in gexamp.c group example program.
+     . added build-time option to timestamp pvmd error log entries.
+       (see TIMESTAMPLOG in src/Makefile.aimk).
+     . master pvmd doesn't close stdin and stdout because rexec
+       needs them (broken in patch 4).
+     . pvmd and libpvm complain if they can't write auth files at
+       connect time (usually because /tmp filesystem is full).
+     . added fortran tidtohost function - pvmftidtohost().
+     . setting autoerr to 2 now makes libpvm exit when as error
+       occurs in any of the libpvm functions.
+ 
  patch #4
  version:
      3.2.3 -> 3.2.4
*** ../netlib/pvm3.2.4/pvmgs/pvm_gsulib.c	Sat Aug 28 17:05:15 1993
--- pvmgs/pvm_gsulib.c	Tue Nov 30 10:43:14 1993
***************
*** 8,13 ****
--- 8,14 ----
   *	05 Mar 1993	pvm_barrier now returns 0 or an error
   *	20 Mar 1993	pvm_bcast does not send to itself, beguelin
   *  01 Jun 1993 Fixed saving and restoring of mbufs, beguelin
+  *	30 Nov 1993 Fixed gs_getgstid() to check spawn return correctly, manchek
   *	
   */
  
***************
*** 33,41 ****
  	if (info == PvmNoEntry) {
  		info = pvm_spawn("pvmgs", (char **)0, PvmMppFront,
  				(char *)0, 1, &gstid);
! 		if (gstid < 0) {
! 			pvm_perror("gs_getgstid");
  			}
  		/* wait for it to register */
  		while(pvm_lookup(GSNAME, 0, &gstid))
  			;
--- 34,46 ----
  	if (info == PvmNoEntry) {
  		info = pvm_spawn("pvmgs", (char **)0, PvmMppFront,
  				(char *)0, 1, &gstid);
! 		if (info != 1) {
! 			if (info == 0 && gstid < 0) {
! 				pvm_errno = gstid;
! 				pvm_perror("gs_getgstid() failed to start group server");
  			}
+ 			return pvm_errno;
+ 		}
  		/* wait for it to register */
  		while(pvm_lookup(GSNAME, 0, &gstid))
  			;
***************
*** 42,48 ****
  			/*
  			fputs("waiting on group server to register\n",stderr);
  			*/
! 		}
  	return(gstid);
  }
  
--- 47,53 ----
  			/*
  			fputs("waiting on group server to register\n",stderr);
  			*/
! 	}
  	return(gstid);
  }
  
*** ../netlib/pvm3.2.4/src/Makefile.aimk	Tue Oct 12 11:10:14 1993
--- src/Makefile.aimk	Mon Nov 29 14:46:46 1993
***************
*** 8,14 ****
  #  ARCHDOBJ   = special objects needed for daemon
  #  HASRANLIB  = 't' or 'f'
  #
! # Define:
  #  FDSETPATCH      if system includes don't have fd_set stuff
  #  NOGETDTBLSIZ    if system doesn't have getdtablesize()
  #  NOREXEC         if system doesn't have rexec()
--- 8,14 ----
  #  ARCHDOBJ   = special objects needed for daemon
  #  HASRANLIB  = 't' or 'f'
  #
! # Compatibility defines (usually in conf/*.def):
  #  FDSETPATCH      if system includes don't have fd_set stuff
  #  NOGETDTBLSIZ    if system doesn't have getdtablesize()
  #  NOREXEC         if system doesn't have rexec()
***************
*** 17,26 ****
  #  NOTMPNAM        if system doesn't have tmpnam() or it's hosed
  #  NOWAIT3         if system doesn't have wait3()
  #  NOWAITPID       if system doesn't have waitpid() either
- #  OVERLOADHOST    to allow different virtual machines to overlap on a host
  #  RSHCOMMAND      for rsh command other than "/usr/ucb/rsh"
- #  RSHNPLL         for number of parallel rsh startups (default is 8)
- #  RSHTIMEOUT      for rsh timeout other than default (60 sec)
  #  SHAREDTMP       if /tmp is shared between machines (yecch)
  #  SOCKADHASLEN    if struct sockaddr has an sa_len field
  #  SYSVBFUNC       if system uses memcpy() instead of bcopy(), etc.
--- 17,23 ----
***************
*** 27,32 ****
--- 24,36 ----
  #  SYSVSIGNAL      if system has sysV signal handling
  #  SYSVSTR         if system uses strchr() instead of index()
  #  UDPMAXLEN       for alternate max udp packet size
+ #
+ # Options defines:
+ #  OVERLOADHOST    to allow different virtual machines to overlap on a host
+ #  RSHNPLL         for number of parallel rsh startups (default is 8)
+ #  RSHTIMEOUT      for rsh timeout other than default (60 sec)
+ #  STATISTICS      to enable collection of statistics in pvmd
+ #  TIMESTAMPLOG    to enable timestamps in pvmd log file
  #  USE_PVM_ALLOC   to enable instrumented malloc functions (for debugging pvm)
  #
  SHELL	=	/bin/sh
*** ../netlib/pvm3.2.4/src/global.h	Wed Oct 27 13:41:14 1993
--- src/global.h	Tue Nov 30 10:49:17 1993
***************
*** 32,37 ****
--- 32,40 ----
   *	Generic includes.
   *
  $Log: global.h,v $
+  * Revision 1.6  1993/11/30  15:49:14  manchek
+  * version change
+  *
   * Revision 1.5  1993/10/27  17:32:16  manchek
   * version change
   *
***************
*** 52,58 ****
  
  /* release version */
  
! #define	PVM_VER	"3.2.4"
  
  /* UDPMAXLEN should be set to the largest UDP message length
     your system can handle. */
--- 55,61 ----
  
  /* release version */
  
! #define	PVM_VER	"3.2.5"
  
  /* UDPMAXLEN should be set to the largest UDP message length
     your system can handle. */
*** ../netlib/pvm3.2.4/src/host.c	Wed Sep 22 16:10:06 1993
--- src/host.c	Tue Nov 30 14:52:18 1993
***************
*** 32,37 ****
--- 32,40 ----
   *	Host table functions.
   *
  $Log: host.c,v $
+  * Revision 1.3  1993/11/30  19:52:05  manchek
+  * readhostfile() puts defaults in ht_hosts[0]
+  *
   * Revision 1.2  1993/09/15  15:03:31  manchek
   * defined max() if not already there
   *
***************
*** 102,108 ****
   **           **
   ***************/
  
! static char rcsid[] = "$Id: host.c,v 1.2 1993/09/15 15:03:31 manchek Exp $";
  static char pvmtxt[1024];			/* scratch space for error messages */
  
  
--- 105,111 ----
   **           **
   ***************/
  
! static char rcsid[] = "$Id: host.c,v 1.3 1993/11/30 19:52:05 manchek Exp $";
  static char pvmtxt[1024];			/* scratch space for error messages */
  
  
***************
*** 665,672 ****
  		pvmlogerror(pvmtxt);
  	}
  
! 	if (defaults)
! 		hd_unref(defaults);
  	fclose(ff);
  	return htp;
  
--- 668,678 ----
  		pvmlogerror(pvmtxt);
  	}
  
! 	if (defaults) {
! 		defaults->hd_hostpart = 0;
! 		defaults->hd_name = STRALLOC("*");
! 		ht_insert(htp, defaults);
! 	}
  	fclose(ff);
  	return htp;
  
*** ../netlib/pvm3.2.4/src/lpvm.c	Tue Oct 12 11:10:15 1993
--- src/lpvm.c	Tue Nov 30 18:50:42 1993
***************
*** 32,37 ****
--- 32,43 ----
   *	Libpvm core for unix environment.
   *
  $Log: lpvm.c,v $
+  * Revision 1.6  1993/11/30  23:50:01  manchek
+  * set nodelay and snd, rcv buffer sizes on t-t sockets
+  *
+  * Revision 1.5  1993/11/30  15:51:30  manchek
+  * beatask complains if it can't write d-auth file (fs full?)
+  *
   * Revision 1.4  1993/10/04  20:29:05  manchek
   * mksocks() and pvm_start_pvmd() now use pvmdsockfile(), not TDSOCKNAME.
   * made pvm_useruid global for pvmcruft.c
***************
*** 118,124 ****
--- 124,134 ----
  #define	TC_CONACK	0x80000002		/* connection request ack */
  #define	TC_TASKEXIT	0x80000003		/* task exited/doesn't exist */
  
+ #ifndef	TTSOCKBUF
+ #define	TTSOCKBUF	0x8000
+ #endif
  
+ 
  char *getenv();
  
  extern struct encvec *enctovec();
***************
*** 205,211 ****
   **           **
   ***************/
  
! static char rcsid[] = "$Id: lpvm.c,v 1.4 1993/10/04 20:29:05 manchek Exp $";
  static int debugmask = 0;				/* which debugging info */
  static int mxfersingle = 1;				/* mxfer returns after single frag */
  static char pvmtxt[512];				/* scratch for error log */
--- 215,221 ----
   **           **
   ***************/
  
! static char rcsid[] = "$Id: lpvm.c,v 1.6 1993/11/30 23:50:01 manchek Exp $";
  static int debugmask = 0;				/* which debugging info */
  static int mxfersingle = 1;				/* mxfer returns after single frag */
  static char pvmtxt[512];				/* scratch for error log */
***************
*** 562,567 ****
--- 572,589 ----
  					(void)close(s);
  
  				} else {
+ #ifndef NOSOCKOPT
+ 					l = 1;
+ 					if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY,
+ 							(char*)&l, sizeof(int)) == -1)
+ 						pvmlogperror("mroute() setsockopt");
+ 					l = TTSOCKBUF;
+ 					if (setsockopt(s, SOL_SOCKET, SO_SNDBUF,
+ 							(char*)&l, sizeof(l)) == -1
+ 					|| setsockopt(s, SOL_SOCKET, SO_RCVBUF,
+ 							(char*)&l, sizeof(l)) == -1)
+ 						pvmlogperror("mroute() setsockopt SO_SNDBUF");
+ #endif
  					pcbp = ttpcb_creat(dtid);
  					pcbp->tt_fd = s;
  					pcbp->tt_sad = sad;
***************
*** 686,697 ****
  				} else {
  					pcbp->tt_state = TTOPEN;
  #ifndef NOSOCKOPT
- #if 0
- 					i = 1;
- 					if (setsockopt(pcbp->tt_fd, IPPROTO_TCP, TCP_NODELAY,
- 							(char*)&i, sizeof(int)) == -1)
- 						pvmlogperror("mctl() setsockopt");
- #endif /*0*/
  					if (setsockopt(pcbp->tt_fd, SOL_SOCKET, SO_LINGER,
  							(char*)linger, sizeof(linger)) == -1)
  						pvmlogperror("mctl() setsockopt");
--- 708,713 ----
***************
*** 800,812 ****
  						} else {
  							pcbp->tt_state = TTOPEN;
  #ifndef NOSOCKOPT
- #if 0
- 							i = 1;
- 							if (setsockopt(pcbp->tt_fd, IPPROTO_TCP,
- 									TCP_NODELAY, (char*)&i, sizeof(int))
- 							== -1)
- 								pvmlogperror("mctl() setsockopt");
- #endif /*0*/
  							if (setsockopt(pcbp->tt_fd, SOL_SOCKET, SO_LINGER,
  									(char*)linger, sizeof(linger)) == -1)
  								pvmlogperror("mctl() setsockopt");
--- 816,821 ----
***************
*** 1170,1175 ****
--- 1179,1196 ----
  						ttpcb_dead(pcbp);
  
  					} else {
+ #ifndef NOSOCKOPT
+ 						n = 1;
+ 						if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY,
+ 								(char*)&n, sizeof(int)) == -1)
+ 							pvmlogperror("mxfer() setsockopt");
+ 						n = TTSOCKBUF;
+ 						if (setsockopt(s, SOL_SOCKET, SO_SNDBUF,
+ 								(char*)&n, sizeof(int)) == -1
+ 						|| setsockopt(s, SOL_SOCKET, SO_RCVBUF,
+ 								(char*)&n, sizeof(n)) == -1)
+ 							pvmlogperror("mxfer() setsockopt SO_SNDBUF");
+ #endif
  						if (debugmask & TDMROUTE) {
  							sprintf(pvmtxt, "mxfer() accept from t%x\n",
  									pcbp->tt_tid);
***************
*** 1601,1608 ****
  		cc = PvmSysErr;
  		goto bail;
  	}
! 	(void)write(authfd, authfn, 1);
  	(void)close(authfd);
  	authfd = -1;
  	authfn[0] = 0;
  
--- 1622,1637 ----
  		cc = PvmSysErr;
  		goto bail;
  	}
! 	cc = write(authfd, authfn, 1);
  	(void)close(authfd);
+ 	if (cc != 1) {
+ 		if (cc == -1)
+ 			pvmlogperror(authfn);
+ 		pvmlogerror("pvmbeatask() can't write d-auth file\n");
+ 		authfn[0] = 0;
+ 		cc = PvmSysErr;
+ 		goto bail;
+ 	}
  	authfd = -1;
  	authfn[0] = 0;
  
*** ../netlib/pvm3.2.4/src/lpvmgen.c	Wed Sep 22 16:10:06 1993
--- src/lpvmgen.c	Tue Nov 30 10:53:38 1993
***************
*** 32,37 ****
--- 32,40 ----
   *	Libpvm generic functions.
   *
  $Log: lpvmgen.c,v $
+  * Revision 1.3  1993/11/30  15:52:42  manchek
+  * implemented case autoerr == 2 in lpvmerr()
+  *
   * Revision 1.2  1993/09/16  21:37:39  manchek
   * pvm_send() missing a return before lpvmerr()
   *
***************
*** 95,101 ****
  
  static int def_match();
  
! static char rcsid[] = "$Id: lpvmgen.c,v 1.2 1993/09/16 21:37:39 manchek Exp $";
  static char pvmtxt[512];				/* scratch for error log */
  static int (*recv_match)() = def_match;
  
--- 98,104 ----
  
  static int def_match();
  
! static char rcsid[] = "$Id: lpvmgen.c,v 1.3 1993/11/30 15:52:42 manchek Exp $";
  static char pvmtxt[512];				/* scratch for error log */
  static int (*recv_match)() = def_match;
  
***************
*** 122,129 ****
  
  /*	lpvmerr()
  *
! *	Error has occurred in libpvm function.  Set pvm_errno and write
! *	error message if pvmautoerr is true.
  */
  
  int
--- 125,135 ----
  
  /*	lpvmerr()
  *
! *	Error has occurred in libpvm function.
! *	Action determined by pvmautoerr (set by setopt):
! *		0	Do nothing
! *		1	Print error message
! *		2	Print error message, exit program with error code
  */
  
  int
***************
*** 140,145 ****
--- 146,155 ----
  		strcat(buf, "()");
  		pvm_perror(buf);
  		fflush(stderr);
+ 		if (pvmautoerr == 2) {
+ 			pvm_exit();
+ 			exit(n);
+ 		}
  	}
  	return n;
  }
*** ../netlib/pvm3.2.4/src/patchlevel.h	Wed Oct 27 13:41:14 1993
--- src/patchlevel.h	Mon Nov 29 13:54:11 1993
***************
*** 1,3 ****
  
! #define PATCHLEVEL 4
  
--- 1,3 ----
  
! #define PATCHLEVEL 5
  
*** ../netlib/pvm3.2.4/src/pvmlog.c	Tue Oct 12 11:10:16 1993
--- src/pvmlog.c	Tue Nov 30 10:54:08 1993
***************
*** 32,37 ****
--- 32,40 ----
   *	Error logging fac.
   *
  $Log: pvmlog.c,v $
+  * Revision 1.3  1993/11/30  15:53:59  manchek
+  * added timestamp option
+  *
   * Revision 1.2  1993/10/04  20:31:21  manchek
   * renamed useruid to pvm_useruid for compat with libpvm.
   * added alternate logfile name if SHAREDTMP is defined
***************
*** 44,49 ****
--- 47,53 ----
  #include <stdio.h>
  #include <errno.h>
  #include <sys/types.h>
+ #include <time.h>
  #include <fcntl.h>
  #ifdef	SYSVSTR
  #include <string.h>
***************
*** 86,92 ****
   **           **
   ***************/
  
! static char rcsid[] = "$Id: pvmlog.c,v 1.2 1993/10/04 20:31:21 manchek Exp $";
  static char pvmtxt[2048];			/* scratch for error log */
  
  
--- 90,96 ----
   **           **
   ***************/
  
! static char rcsid[] = "$Id: pvmlog.c,v 1.3 1993/11/30 15:53:59 manchek Exp $";
  static char pvmtxt[2048];			/* scratch for error log */
  
  
***************
*** 104,125 ****
  	static char *toomuch = "\n*** logging truncated\n";
  	static int log_alrdy = 0;		/* how much already written to file */
  	int len = strlen(s);
! 	char buf[32];
  	int l;
  
  	if (log_how & 1) {
  		if (mytid)
  			fprintf(stderr, "[t%x] %s", mytid, s);
  		else
  			fprintf(stderr, "[pvmd pid%d] %s", myunixpid, s);
  	}
  
  	if (log_how & 2) {
  		if (log_alrdy < PVMDLOGMAX) {
  			if (mytid)
  				sprintf(buf, "[t%x] ", mytid);
  			else
  				sprintf(buf, "[pvmd pid%d] ", myunixpid);
  			l = strlen(buf);
  			(void)write(log_fd, buf, l);
  			(void)write(log_fd, s, len);
--- 108,175 ----
  	static char *toomuch = "\n*** logging truncated\n";
  	static int log_alrdy = 0;		/* how much already written to file */
  	int len = strlen(s);
! 	char buf[40];
  	int l;
+ #ifdef	TIMESTAMPLOG
+ 	time_t now;
+ 	struct tm *tmp;
  
+ 	time(&now);
+ 	tmp = localtime(&now);
+ #endif	/*TIMESTAMPLOG*/
+ 
  	if (log_how & 1) {
+ #ifdef	TIMESTAMPLOG
  		if (mytid)
+ 			fprintf(stderr, "[t%x] %02d/%02d %02d:%02d:%02d %s", mytid,
+ 					tmp->tm_mon + 1,
+ 					tmp->tm_mday,
+ 					tmp->tm_hour,
+ 					tmp->tm_min,
+ 					tmp->tm_sec,
+ 					s);
+ 		else
+ 			fprintf(stderr, "[pvmd pid%d] %02d/%02d %02d:%02d:%02d %s", myunixpid,
+ 					tmp->tm_mon + 1,
+ 					tmp->tm_mday,
+ 					tmp->tm_hour,
+ 					tmp->tm_min,
+ 					tmp->tm_sec,
+ 					s);
+ 
+ #else	/*TIMESTAMPLOG*/
+ 		if (mytid)
  			fprintf(stderr, "[t%x] %s", mytid, s);
  		else
  			fprintf(stderr, "[pvmd pid%d] %s", myunixpid, s);
+ #endif	/*TIMESTAMPLOG*/
  	}
  
  	if (log_how & 2) {
  		if (log_alrdy < PVMDLOGMAX) {
+ #ifdef	TIMESTAMPLOG
  			if (mytid)
+ 				sprintf(buf, "[t%x] %02d/%02d %02d:%02d:%02d ", mytid,
+ 						tmp->tm_mon + 1,
+ 						tmp->tm_mday,
+ 						tmp->tm_hour,
+ 						tmp->tm_min,
+ 						tmp->tm_sec);
+ 			else
+ 				sprintf(buf, "[pvmd pid%d] %02d/%02d %02d:%02d:%02d ", myunixpid,
+ 						tmp->tm_mon + 1,
+ 						tmp->tm_mday,
+ 						tmp->tm_hour,
+ 						tmp->tm_min,
+ 						tmp->tm_sec);
+ 
+ #else	/*TIMESTAMPLOG*/
+ 			if (mytid)
  				sprintf(buf, "[t%x] ", mytid);
  			else
  				sprintf(buf, "[pvmd pid%d] ", myunixpid);
+ #endif	/*TIMESTAMPLOG*/
+ 
  			l = strlen(buf);
  			(void)write(log_fd, buf, l);
  			(void)write(log_fd, s, len);
*** ../netlib/pvm3.2.4/src/startup.c	Wed Oct 27 13:41:14 1993
--- src/startup.c	Tue Nov 30 14:55:21 1993
***************
*** 32,37 ****
--- 32,47 ----
   *	Exec more pvmds.  It's good for you.
   *
  $Log: startup.c,v $
+  * Revision 1.6  1993/11/30  19:54:41  manchek
+  * check the default entry in filehosts when adding new hosts
+  *
+  * Revision 1.5  1993/11/30  16:46:10  manchek
+  * pass whole remote command as a single arg to rsh
+  *
+  * Revision 1.4  1993/11/30  15:54:37  manchek
+  * master pvmd once again doesn't close fds 0..2 -
+  * this broke rexec startup
+  *
   * Revision 1.3  1993/10/25  20:53:51  manchek
   * fixed a few typos in error log messages.
   * added code to close all fds and reopen 0..2 as /dev/null
***************
*** 147,153 ****
   **           **
   ***************/
  
! static char rcsid[] = "$Id: startup.c,v 1.3 1993/10/25 20:53:51 manchek Exp $";
  static char pvmtxt[1024];		/* scratch for error log */
  
  
--- 157,163 ----
   **           **
   ***************/
  
! static char rcsid[] = "$Id: startup.c,v 1.6 1993/11/30 19:54:41 manchek Exp $";
  static char pvmtxt[1024];		/* scratch for error log */
  
  
***************
*** 466,472 ****
  	*/
  
  	hp = hosts->ht_hosts[1];
! 	if (filehosts && (hp2 = nametohost(filehosts, hp->hd_name))) {
  		if (hp2->hd_epath)
  			hp->hd_epath = STRALLOC(hp2->hd_epath);
  		if (hp2->hd_bpath)
--- 476,484 ----
  	*/
  
  	hp = hosts->ht_hosts[1];
! 	if (filehosts &&
! 			((hp2 = nametohost(filehosts, hp->hd_name))
! 			|| (hp2 = filehosts->ht_hosts[0]))) {
  		if (hp2->hd_epath)
  			hp->hd_epath = STRALLOC(hp2->hd_epath);
  		if (hp2->hd_bpath)
***************
*** 481,487 ****
  
  	/* close everything but our sockets */
  
! 	for (i = getdtablesize(); --i >= 0; )
  /* XXX don't like this - hard to maintain */
  		if (i != netsock && i != ppnetsock && i != loclsock && i != log_fd)
  			(void)close(i);
--- 493,499 ----
  
  	/* close everything but our sockets */
  
! 	for (i = getdtablesize(); --i > 2; )
  /* XXX don't like this - hard to maintain */
  		if (i != netsock && i != ppnetsock && i != loclsock && i != log_fd)
  			(void)close(i);
***************
*** 626,632 ****
  	* first check table from host file if available
  	*/
  
! 		if (filehosts && (hp2 = nametohost(filehosts, hp->hd_name))) {
  			hp->hd_flag |= hp2->hd_flag;
  			if (hp2->hd_login)
  				hp->hd_login = STRALLOC(hp2->hd_login);
--- 638,649 ----
  	* first check table from host file if available
  	*/
  
! 		if (filehosts)
! 			(hp2 = nametohost(filehosts, hp->hd_name))
! 			|| (hp2 = filehosts->ht_hosts[0]);
! 		else
! 			hp2 = 0;
! 		if (hp2) {
  			hp->hd_flag |= hp2->hd_flag;
  			if (hp2->hd_login)
  				hp->hd_login = STRALLOC(hp2->hd_login);
***************
*** 636,646 ****
  				hp->hd_epath = STRALLOC(hp2->hd_epath);
  			if (hp2->hd_bpath)
  				hp->hd_bpath = STRALLOC(hp2->hd_bpath);
  			BCOPY((char*)&hp2->hd_sad.sin_addr, (char*)&hp->hd_sad.sin_addr,
  					sizeof(struct in_addr));
! 			hp->hd_speed = hp2->hd_speed;
! 
! 		} else {
  			if (he = gethostbyname(hp->hd_name)) {
  				BCOPY(he->h_addr_list[0], (char*)&hp->hd_sad.sin_addr,
  						sizeof(struct in_addr));
--- 653,663 ----
  				hp->hd_epath = STRALLOC(hp2->hd_epath);
  			if (hp2->hd_bpath)
  				hp->hd_bpath = STRALLOC(hp2->hd_bpath);
+ 			hp->hd_speed = hp2->hd_speed;
  			BCOPY((char*)&hp2->hd_sad.sin_addr, (char*)&hp->hd_sad.sin_addr,
  					sizeof(struct in_addr));
! 		}
! 		if (!hp2 || !hp2->hd_hostpart) {
  			if (he = gethostbyname(hp->hd_name)) {
  				BCOPY(he->h_addr_list[0], (char*)&hp->hd_sad.sin_addr,
  						sizeof(struct in_addr));
***************
*** 1173,1208 ****
  				av[ac++] = "-l";
  				av[ac++] = hp->hd_login;
  			}
! 			av[ac++] = hp->hd_dpath ? hp->hd_dpath : pvmgetrpvmd();
! 			av[ac++] = "-s";
! 			(void)sprintf(buf, "-d%x", debugmask);
! 			av[ac++] = STRALLOC(buf);
! 
! 			(void)sprintf(buf, "-n%s", hn);
! 			av[ac++] = STRALLOC(buf);
! 
! 			/* master host index */
! 			sprintf(buf, "%d", hosts->ht_master);
! 			av[ac++] = STRALLOC(buf);
! 
! 			/* master host sockaddr */
! 			p = inadport_hex(&hosts->ht_hosts[hosts->ht_master]->hd_sad);
! 			av[ac++] = STRALLOC(p);
! 
! 			/* master host mtu */
! 			sprintf(buf, "%d", hosts->ht_hosts[hosts->ht_master]->hd_mtu);
! 			av[ac++] = STRALLOC(buf);
! 
! 			/* this slave index */
! 			sprintf(buf, "%d",
! 					((hp->hd_hostpart & tidhmask) >> (ffs(tidhmask) - 1)));
! 			av[ac++] = STRALLOC(buf);
! 
! 			/* this slave sockaddr */
! 			p = inadport_hex(&hp->hd_sad);
! 			av[ac++] = STRALLOC(p);
! 
  			av[ac++] = 0;
  			execvp(av[0], av);
  			fputs("phase1() execvp failed\n", stderr);
  			fflush(stderr);
--- 1190,1212 ----
  				av[ac++] = "-l";
  				av[ac++] = hp->hd_login;
  			}
! 			(void)sprintf(buf, "%s -s -d%x -n%s %d %s %d",
! 					hp->hd_dpath ? hp->hd_dpath : pvmgetrpvmd(),
! 					debugmask,
! 					hn,
! 					hosts->ht_master,
! 					inadport_hex(&hosts->ht_hosts[hosts->ht_master]->hd_sad),
! 					hosts->ht_hosts[hosts->ht_master]->hd_mtu);
! 			(void)sprintf(buf + strlen(buf), " %d %s\n",
! 					((hp->hd_hostpart & tidhmask) >> (ffs(tidhmask) - 1)),
! 					inadport_hex(&hp->hd_sad));
! 			av[ac++] = buf;
  			av[ac++] = 0;
+ 			if (debugmask & PDMSTARTUP) {
+ 				for (ac = 0; av[ac]; ac++)
+ 					fprintf(stderr, "av[%d]=\"%s\" ", ac, av[ac]);
+ 				fputc('\n', stderr);
+ 			}
  			execvp(av[0], av);
  			fputs("phase1() execvp failed\n", stderr);
  			fflush(stderr);
***************
*** 1500,1535 ****
  				av[ac++] = "-l";
  				av[ac++] = hp->hd_login;
  			}
! 			av[ac++] = hp->hd_dpath ? hp->hd_dpath : pvmgetrpvmd();
! 			av[ac++] = "-s";
! 			(void)sprintf(buf, "-d%x", debugmask);
! 			av[ac++] = STRALLOC(buf);
! 
! 			(void)sprintf(buf, "-n%s", hn);
! 			av[ac++] = STRALLOC(buf);
! 
! 			/* master host index */
! 			sprintf(buf, "%d", hosts->ht_master);
! 			av[ac++] = STRALLOC(buf);
! 
! 			/* master host sockaddr */
! 			p = inadport_hex(&hosts->ht_hosts[hosts->ht_master]->hd_sad);
! 			av[ac++] = STRALLOC(p);
! 
! 			/* master host mtu */
! 			sprintf(buf, "%d", hosts->ht_hosts[hosts->ht_master]->hd_mtu);
! 			av[ac++] = STRALLOC(buf);
! 
! 			/* this slave index */
! 			sprintf(buf, "%d",
! 					((hp->hd_hostpart & tidhmask) >> (ffs(tidhmask) - 1)));
! 			av[ac++] = STRALLOC(buf);
! 
! 			/* this slave sockaddr */
! 			p = inadport_hex(&hp->hd_sad);
! 			av[ac++] = STRALLOC(p);
! 
  			av[ac++] = 0;
  			execvp(av[0], av);
  			fputs("slave_exec() execvp failed\n", stderr);
  			fflush(stderr);
--- 1504,1526 ----
  				av[ac++] = "-l";
  				av[ac++] = hp->hd_login;
  			}
! 			(void)sprintf(buf, "%s -s -d%x -n%s %d %s %d",
! 					hp->hd_dpath ? hp->hd_dpath : pvmgetrpvmd(),
! 					debugmask,
! 					hn,
! 					hosts->ht_master,
! 					inadport_hex(&hosts->ht_hosts[hosts->ht_master]->hd_sad),
! 					hosts->ht_hosts[hosts->ht_master]->hd_mtu);
! 			(void)sprintf(buf + strlen(buf), " %d %s\n",
! 					((hp->hd_hostpart & tidhmask) >> (ffs(tidhmask) - 1)),
! 					inadport_hex(&hp->hd_sad));
! 			av[ac++] = buf;
  			av[ac++] = 0;
+ 			if (debugmask & PDMSTARTUP) {
+ 				for (ac = 0; av[ac]; ac++)
+ 					fprintf(stderr, "av[%d]=\"%s\" ", ac, av[ac]);
+ 				fputc('\n', stderr);
+ 			}
  			execvp(av[0], av);
  			fputs("slave_exec() execvp failed\n", stderr);
  			fflush(stderr);
*** ../netlib/pvm3.2.4/src/task.c	Mon Aug 30 19:29:34 1993
--- src/task.c	Tue Nov 30 10:56:09 1993
***************
*** 32,37 ****
--- 32,40 ----
   *	Task descriptors.
   *
  $Log: task.c,v $
+  * Revision 1.2  1993/11/30  15:55:25  manchek
+  * task_free() deletes auth file if one exists
+  *
   * Revision 1.1  1993/08/30  23:26:51  manchek
   * Initial revision
   *
***************
*** 79,85 ****
   **           **
   ***************/
  
! static char rcsid[] = "$Id: task.c,v 1.1 1993/08/30 23:26:51 manchek Exp $";
  static char pvmtxt[512];		/* scratch for error log */
  
  
--- 82,88 ----
   **           **
   ***************/
  
! static char rcsid[] = "$Id: task.c,v 1.2 1993/11/30 15:55:25 manchek Exp $";
  static char pvmtxt[512];		/* scratch for error log */
  
  
***************
*** 203,210 ****
  		pk_free(tp->t_txq);
  	if (tp->t_wait)
  		wait_delete(tp->t_wait);
! 	if (tp->t_authnam)
  		PVM_FREE(tp->t_authnam);
  	if (tp->t_sock != -1) {
  		wrk_fds_delete(tp->t_sock, 3);
  		(void)close(tp->t_sock);
--- 206,215 ----
  		pk_free(tp->t_txq);
  	if (tp->t_wait)
  		wait_delete(tp->t_wait);
! 	if (tp->t_authnam) {
! 		(void)unlink(tp->t_authnam);
  		PVM_FREE(tp->t_authnam);
+ 	}
  	if (tp->t_sock != -1) {
  		wrk_fds_delete(tp->t_sock, 3);
  		(void)close(tp->t_sock);
*** ../netlib/pvm3.2.4/src/tdpro.c	Mon Aug 30 19:29:34 1993
--- src/tdpro.c	Tue Nov 30 10:56:44 1993
***************
*** 32,37 ****
--- 32,40 ----
   *	Entry points for messages from local tasks.
   *
  $Log: tdpro.c,v $
+  * Revision 1.2  1993/11/30  15:56:23  manchek
+  * tm_conn() complains if it can't write t-auth file (fs full?)
+  *
   * Revision 1.1  1993/08/30  23:26:52  manchek
   * Initial revision
   *
***************
*** 95,101 ****
   **           **
   ***************/
  
! static char rcsid[] = "$Id: tdpro.c,v 1.1 1993/08/30 23:26:52 manchek Exp $";
  static char pvmtxt[512];		/* scratch for error log */
  
  int tm_addhost();
--- 98,104 ----
   **           **
   ***************/
  
! static char rcsid[] = "$Id: tdpro.c,v 1.2 1993/11/30 15:56:23 manchek Exp $";
  static char pvmtxt[512];		/* scratch for error log */
  
  int tm_addhost();
***************
*** 255,260 ****
--- 258,264 ----
  	int ver;						/* task's libpvm t-d proto version */
  	char authfn[LEN_OF_TMP_NAM];	/* t-auth file name */
  	int d;
+ 	int cc;
  
  	if (upkint(mp, &ver) || upkstr(mp, authfn, sizeof(authfn))) {
  		pvmlogerror("tm_connect() bad msg format\n");
***************
*** 291,297 ****
  		pvmlogperror("tm_connect() can't open t-auth file");
  		goto bail;
  	}
! 	(void)write(d, authfn, 1);
  	(void)close(d);
  
  	tp->t_authnam = TALLOC(LEN_OF_TMP_NAM, char, "auth");
--- 295,306 ----
  		pvmlogperror("tm_connect() can't open t-auth file");
  		goto bail;
  	}
! 	cc = write(d, authfn, 1);
! 	if (cc != 1) {
! 		if (cc == -1)
! 			pvmlogperror(authfn);
! 		pvmlogerror("tm_connect() can't write t-auth file\n");
! 	}
  	(void)close(d);
  
  	tp->t_authnam = TALLOC(LEN_OF_TMP_NAM, char, "auth");
***************
*** 304,309 ****
--- 313,320 ----
  	if ((tp->t_authfd = open(tp->t_authnam, O_RDONLY|O_CREAT|O_TRUNC, 0600))
  	== -1) {
  		pvmlogperror("tm_connect() can't create d-auth file");
+ 		PVM_FREE(tp->t_authnam);
+ 		tp->t_authnam = 0;
  		goto bail;
  	}
  
