NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/54564: cp of a fifo yields an empty file



>Number:         54564
>Category:       bin
>Synopsis:       cp of a fifo yields an empty file
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 23 14:40:00 +0000 2019
>Originator:     Jan Schaumann
>Release:        NetBSD 8.1
>Organization:
	
>Environment:
NetBSD apue 8.1 NetBSD 8.1 (GENERIC) #0: Fri May 31 08:43:59 UTC 2019  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:

When trying to copy a fifo, the resulting file is empty.

When cp(1) opens the fifo and begins reading, it will naturally block.
Once data is written to the fifo, cp(1) completes, but the resulting
file remains empty.

This is counter to the user's expectation that any content written
to the fifo would be copied.

>How-To-Repeat:
	mkfifo fifo
	cp fifo file &
	echo foo >fifo
	cat file
>Fix:
	Compare to what OS X cp(1) does; that yields a file
	containing 'foo'.



Home | Main Index | Thread Index | Old Index