ntpdate fails except from the command line of cshell (Pyramid OSx)

Jim Rees rees at pisa.ifs.umich.edu
Fri Nov 16 03:38:46 AEST 1990


In article <1990Nov14.203218.18459 at massey.ac.nz>, A.Raman at massey.ac.nz (A.V.Raman) writes:
  When I run ntpdate from the csh command line like so
  csh>ntpdate ntphost
  ntpdate: adjust timeserver 130.123.1.7 offset 0.0071640
  
  it works fine.  But that's all.  None of the following works.

I'm not sure this is your problem, but on my Apollo I had to make the
following fix:

*** ntpdate.c_o	Wed Apr 11 12:32:17 1990
--- ntpdate.c	Wed Apr 11 12:31:31 1990
***************
*** 1158,1163 ****
--- 1158,1165 ----
  	full_recvbufs = 0;
  	free_recvbufs = sys_numservers + 2;
  
+ 	setpgrp(0, getpid());
+ 
  	/*
  	 * Point SIGIO at service routine
  	 */

It seems the SIGIO gets lost, because the pid of the process that opened
the socket (or set the SIGIO?) isn't the same as the process group that
wants to get the SIGIO.

  The Pyramid runs OSx 5.0 and supports two universes - att and ucb.

That's nothing.  My Apollo has at least three or four universes (bsd4.1,
bsd4.2, bsd4.3, sys5.2, sys5.3, ad nauseum).  I run ntpdate in the bsd4.3
universe.  Maybe this is a universal problem?

  sh -c ntpdate and csh -c ntpdate work fine on other machines (DEC stations
  and Suns)

This could be construed as a bug on those machines, since the SIGIO should
only go the pgroup of the process that owns the socket.  But since the
difference between a bug and a feature is often simply which is more
popular, maybe it really is a feature.

By the way, ntpd has the same problem.  Here's the fix.

*** xntpd/ntpd.c/1	Sat Sep 23 17:22:45 1989
--- xntpd/ntpd.c	Fri Mar 23 00:38:51 1990
***************
*** 119,124 ****
--- 119,125 ----
  				(void) ioctl(s, (u_long) TIOCNOTTY, (char *) 0);
  				(void) close(s);
  			}
+ 			(void) setpgrp(0, getpid());
  		}
  #ifdef	DEBUG
  	}

Thanks to Bill Sommerfeld of Apollo for finding/fixing this.



More information about the Comp.sys.pyramid mailing list