Bug in file read/write with forked file-descriptors

Chris Torek chris at mimsy.UUCP
Sun Sep 24 05:52:30 AEST 1989


In article <19757 at mimsy.UUCP> I wrote:
>This bug was fixed quite some time ago (perhaps in 4.3-tahoe, perhaps a
>bit afterward).  Here is the fix.  Your lines numbers may not match.

Oops, you have to change sys_generic.c as well:

*** /tmp/,RCSt1006180	Sat Sep 23 15:49:38 1989
--- /tmp/,RCSt2006180	Sat Sep 23 15:49:41 1989
***************
*** 136,140 ****
  	}
  	count = uio->uio_resid;
- 	uio->uio_offset = fp->f_offset;
  	if (setjmp(&u.u_qsave)) {
  		if (uio->uio_resid == count) {
--- 137,140 ----
***************
*** 147,151 ****
  		u.u_error = (*fp->f_ops->fo_rw)(fp, rw, uio);
  	u.u_r.r_val1 = count - uio->uio_resid;
- 	fp->f_offset += u.u_r.r_val1;
  }
  
--- 147,150 ----
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



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