lock hangs on 4.2

jso at edison.UUCP jso at edison.UUCP
Wed Jun 20 06:09:12 AEST 1984


Index: 	ucb/lock.c 4.2BSD

Description:
	lock hangs on EOF read with 4.2
Repeat-By:
	lock, and type your eof character
Fix:
*** src/lock.c	Tue Jun 19 16:00:29 1984
--- /usr/src/ucb/lock.c	Sat Jul  2 03:51:54 1983
***************
*** 42,49
  	}
  	s[0] = 0;
  	for (;;) {
! 		if(fgets(s, sizeof s, stdin) == NULL)
! 			clearerr(stdin);
  		if (strcmp(s1, s) == 0)
  			break;
  		if (strcmp(s, masterp) == 0)

--- 42,48 -----
  	}
  	s[0] = 0;
  	for (;;) {
! 		fgets(s, sizeof s, stdin);
  		if (strcmp(s1, s) == 0)
  			break;
  		if (strcmp(s, masterp) == 0)



More information about the Comp.bugs.4bsd.ucb-fixes mailing list