From owner-freebsd-bugs Mon Mar 13 15:50:10 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 87FEB37B63C for ; Mon, 13 Mar 2000 15:50:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id PAA71621; Mon, 13 Mar 2000 15:50:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 30E3B37B6B8 for ; Mon, 13 Mar 2000 15:40:11 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.3/8.9.3) id RAA46549; Mon, 13 Mar 2000 17:40:04 -0600 (CST) (envelope-from dan) Message-Id: <200003132340.RAA46549@dan.emsphone.com> Date: Mon, 13 Mar 2000 17:40:04 -0600 (CST) From: dnelson@emsphone.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/17366: sendfile() has no pthreads wrapper Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 17366 >Category: bin >Synopsis: sendfile() has no pthreads wrapper >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Mar 13 15:50:01 PST 2000 >Closed-Date: >Last-Modified: >Originator: Dan Nelson >Release: FreeBSD 4.0-CURRENT i386 >Organization: Executive Marketing Service, Inc. >Environment: FreeBSD dan.emsphone.com 4.0-CURRENT FreeBSD 4.0-CURRENT #49: Thu Feb 10 09:22:17 CST 2000 dan@dan.emsphone.com:/usr/src/sys/compile/DANSMP i386 >Description: There is no pthreads wrapper for the sendfile() call. This causes a problem if someone tries to call sendfile() on a blocking socket. Pthreads always set sockets to non-blocking, and sendfile() will return EAGAIN on non-blocking sockets instead of blocking and sending the file. Even though sendfile() doesn't make much sense with out current user-threads implementation, POLA suggests that a threaded sendfile() should behave the same as a non-threaded sendfile() from the point of view of the application. >How-To-Repeat: call sendfile() on a blocking socket in a threaded application. >Fix: write a sendfile() wrapper that does the right thing. >Release-Note: >Audit-Trail: >Unformatted: Dan Nelson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message