From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 7 08:14:31 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2801316A4BF for ; Sun, 7 Sep 2003 08:14:31 -0700 (PDT) Received: from xeon.unixathome.org (bast.unixathome.org [66.11.174.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7203443FE9 for ; Sun, 7 Sep 2003 08:14:30 -0700 (PDT) (envelope-from dan@langille.org) Received: by xeon.unixathome.org (Postfix, from userid 1000) id 5C7233E5F; Sun, 7 Sep 2003 11:14:30 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by xeon.unixathome.org (Postfix) with ESMTP id 50B3E3E5E; Sun, 7 Sep 2003 11:14:30 -0400 (EDT) Date: Sun, 7 Sep 2003 11:14:30 -0400 (EDT) From: Dan Langille X-X-Sender: dan@xeon.unixathome.org To: freebsd-hackers@FreeBSD.org Message-ID: <20030907110314.U78699@xeon.unixathome.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Dan Nelson cc: Nate Lawson cc: Kern Sibbald Subject: comments on proposed uthread_write.c changes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2003 15:14:31 -0000 A problem with pthreads and EOT has been identified. See PR 56274. It was suggested the solution was probably just a matter of changing one of the >0 tests to >=0 in uthread_write.c Any comments on that? Here's a diff I came up with after looking at src/lib/libc_r/uthreaduthread_write.c. Any suggestions/comments? I plan to apply and test this later in the week. --- uthread_write.c Sun Sep 7 11:01:13 2003 +++ uthread_write.c.org Sun Sep 7 10:58:31 2003 @@ -131,7 +131,7 @@ * If there was an error, return partial success * (if any bytes were written) or else the error: */ - } else if (n <= 0) { + } else if (n < 0) { if (num > 0) ret = num; else