Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Mar 2000 17:40:04 -0600 (CST)
From:      dnelson@emsphone.com
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/17366: sendfile() has no pthreads wrapper
Message-ID:  <200003132340.RAA46549@dan.emsphone.com>

next in thread | raw e-mail | index | archive | help

>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003132340.RAA46549>