kern/93685: select on pipe write fails from '0' end

Ian West ian at niw.com.au
Tue Feb 21 17:10:04 PST 2006


>Number:         93685
>Category:       kern
>Synopsis:       select on pipe write fails from '0' end
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 22 01:10:03 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Ian West
>Release:        6.1pre
>Organization:
>Environment:
FreeBSD 6.1-PRERELEASE Sun Feb 5
>Description:
I have an application which has always opened a pipe and used the 0 index as the writer and the 1 index as the reader when forking. Admittedly this is against the recommendation, but with previous versions of BSD it has been fine (up to 4.11). With this code migrated to 6.1PRE, the select for write never returns true. If I swap the fd's around the problem is resolved. Easy for me to sort out, but could be a problem for bidirectional pipe users ?         
>How-To-Repeat:
Configure a pipe the 'wrong' way around. Write to fd[0] on the source end, try and configure this for non-blocking using select on write buffer available. Using fd[1] from the pipe command works correctly. 4.11 works either way.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list