[net.bugs.4bsd] tip fails to cycle past a "dead" device

grandi@noao.UUCP (Steve Grandi) (10/16/86)

Subject: tip fails to cycle past a "dead" device.
Index:	/usr/src/usr.bin/tip/hunt.c 4.3BSD

Description:
	The following bug report and fix are brought to you by Richard Wolff.

	tip fails to cycle through multiple modem devices (dv entry in
/etc/remote) if a particular device is found to be "dead".  Cycling works
properly only when a device is "busy".

Repeat-By:
	Have multiple entries for dv in /etc/remote.  Arrange for the first
device in the list to be "dead" (powering-off the modem works for me).  Try
to tip and notice the "all ports busy" message.

Fix:

*** hunt.c.ORIG	Mon Dec  9 19:42:14 1985
--- hunt.c	Thu Aug 21 09:34:58 1986
***************
*** 30,36 ****
  	int (*f)();
  
  	f = signal(SIGALRM, dead);
- 	deadfl = 0;
  	while (cp = getremote(name)) {
  		uucplock = rindex(cp, '/')+1;
  		if (mlock(uucplock) < 0) {
--- 30,35 ----
***************
*** 46,51 ****
--- 45,51 ----
  		 */
  		if (!HW)
  			break;
+ 		deadfl = 0;
  		if (setjmp(deadline) == 0) {
  			alarm(10);
  			FD = open(cp, O_RDWR);
-- 
Steve Grandi, National Optical Astronomy Observatories, Tucson, AZ, 602-325-9228
{arizona,decvax,hao,ihnp4,seismo}!noao!grandi  grandi%draco@Hamlet.Caltech.Edu