Date: Sat, 23 May 1998 07:19:25 +1000 (EST) From: John Birrell <jb@cimlogic.com.au> To: info@highwind.com (HighWind Software Information) Cc: jb@cimlogic.com.au, freebsd-hackers@FreeBSD.ORG, support@highwind.com Subject: Re: FreeBSD 2.2.6 + pthread == write() bug Message-ID: <199805222119.HAA13177@cimlogic.com.au> In-Reply-To: <199805222106.RAA05684@highwind.com> from HighWind Software Information at "May 22, 98 05:06:57 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
HighWind Software Information wrote: > A customer of ours pointed out that FreeBSD 3.0's uthread_write.c has > a "_thread_kern_sig_block(&status);" in there as well. Unknown if that > is the issue. -current has changed away from blocking signals for performance reasons, so I think that comment is a bit out-of-date. > I also believe that write() calls are returning "EAGAIN" sometimes and > writing data. Unless it actually returns an error, you shouldn't bother about what errno is set to because the library uses EAGAIN internally. > > It is supposed to return EAGAIN and have written NO data. That way, when > you retry the write() call, it doesn't resend the same data. Looking at the code, it doesn't check for a short write on a blocking fd. You are quite right, it should check the number of bytes written and keep looping until it has written the number of bytes required. It will take me a little while to update my 2.2.6 system (it normally runs -current). -- John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/ CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805222119.HAA13177>