[1592] in testers

home help back first fref pref prev next nref lref last post

edsc loops

daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Sun Jul 28 21:17:14 1991

To: testers@ATHENA.MIT.EDU, bug-discuss@ATHENA.MIT.EDU
Date: Sun, 28 Jul 91 21:17:17 EDT
From: John Carr <jfc@ATHENA.MIT.EDU>


Running the RT 7.3 edsc I tried to switch the transaction flag in emacs
discuss.  edsc looped eating CPU time.  adb says:

	_.write()  from _.do_gtf+0x284
	_.do_gtf(r12=0x1fff9b10)  from _.main+0x2b6
	_.main(r2=  00000000, r3=0x1fff9b10)  from .oVncs+0x2e
	.oVncs(r2=  00000000, r3=0x1fff9b10, r4=  00000000)

(By the way, there are at least two function named "do_gtf" in the edsc
source directory.  It took me a while to find the right one.)

The source code is:

	     while ((cc = read(rfd, buf, sizeof(buf))) >= 0) {
		     if (cc != write(fd, buf, cc)) {
			     printf("; Failed write!\n");
			     dsc_destroy_name_blk(&nb);
			     return;
		     }
	     }

The ">= 0" should be "> 0": if read gets EOF write should not be
called and the loop should not continue.

Why did 'F' work when I used the SIPB version?  Isn't the source identical?


home help back first fref pref prev next nref lref last post