Subject: standards/9450: named pipes behave inconstantly
To: None <gnats-bugs@gnats.netbsd.org>
From: None <christos@zoulas.com>
List: netbsd-bugs
Date: 02/19/2000 15:00:42
>Number:         9450
>Category:       standards
>Synopsis:       named pipes behave inconsistantly
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    standards-manager (NetBSD Standards Conformance bug manager)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 19 15:00:01 2000
>Last-Modified:
>Originator:     Christos Zoulas
>Organization:
	None lately
>Release:        20000215
>Environment:
System: NetBSD gw4.blink.com 1.4S NetBSD 1.4S (GENERIC) #4: Tue Feb 15 16:04:58 EST 2000 christos@gw4.blink.com:/home/NetBSD/co/src/sys/arch/i386/compile/GENERIC i386


>Description:

It appears that on linux/solaris the second process opens the same
filehandle; the writer writes, both read ers are awakened,  one of
them reads the data, gets end of file exits, the seco nd attempts
a read gets end of file.

We appear to create a new filehandle for each reader.

Which one is correct according to the standards?

>How-To-Repeat:

Linux/Solaris:
.	[5:42pm] 914>mknod foo p
.	[5:43pm] 915>cat < foo &
.	[6] 21484
.	[5:43pm] 916>cat < foo &
.	[7] 21485
.	[5:43pm] 917>echo > foo
.	[7]    Done                          cat < foo
.	[6]    Done                          cat < foo
NetBSD:
.	[12:33pm] 26>mknod foo p
.	[12:33pm] 27>cat < foo &
.	[1] 18656
.	[12:33pm] 28>cat < foo &
.	[2] 18657
.	[12:33pm] 29>echo > foo
.	[2]    Done                          cat < foo
.	[12:33pm] 30>echo > foo
.	[1]    Done                          cat < foo

>Fix:

Read the standard.
>Audit-Trail:
>Unformatted: