Bug 7538

Summary: cpio (cpio-2.4.2-13) closes filedescriptor to early
Product: [Retired] Red Hat Linux Reporter: Karsten Hopp <karsten.hopp>
Component: cpioAssignee: bero
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: high    
Version: 6.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-12-17 18:52:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Karsten Hopp 1999-12-03 14:18:48 UTC
There's a new bug in release 13 of cpio. If you write an archive with
verbose-mode, the filedescriptor 1 will be closed and after that the
filename should be written to this descriptor.
Try this:
echo /etc/passwd | strace cpio -ocvB >/dev/null

The last few lines will look like this:

==>	close(1)                                = 0
==>	write(1, "/etc/passwd\n", 12)           = -1 EBADF (Bad file
descriptor)



        Karsten

Comment 1 Karsten Hopp 1999-12-04 13:36:59 UTC
Should be an easy fix.
Shanged priority to 4high4, because several backup-systems rely on
the output of the filename after writing the archive.
(Return value is not valid on every system)

    Karsten

Comment 2 Jeff Johnson 1999-12-17 18:52:59 UTC
I believe that this problem is fixed by reverting the stdout patch (#3358)
that has been done in cpio-2.4.2-14. Please reopen this bug if I'm wrong.

Comment 3 Karsten Hopp 1999-12-20 10:39:59 UTC
Ok, it's fixed.

 Thanks
         Karsten