OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
CVS: cvs.openbsd.org: src

From: Kurt Miller (kurtcvs.openbsd.org)
Date: Mon Oct 02 2006 - 21:59:37 CDT


CVSROOT: /cvs
Module name: src
Changes by: kurtcvs.openbsd.org 2006/10/02 20:59:36

Modified files:
        lib/libpthread/uthread: pthread_private.h uthread_accept.c
                                uthread_connect.c uthread_kern.c
                                uthread_kevent.c uthread_poll.c
                                uthread_read.c uthread_readv.c
                                uthread_recvfrom.c uthread_recvmsg.c
                                uthread_select.c uthread_sendmsg.c
                                uthread_sendto.c uthread_write.c
                                uthread_writev.c

Log message:
Last Part of file descriptor race and deadlock corrections.

When a fd enters the closing state prevent any threads from
polling the fd and reschedule the thread with the closing_fd
flag set. This fixes a class of deadlocks where a thread is
blocked waiting for data (that may never arrive) and a later
thread calls close() or dup2() on the fd. okay brad