[Bug 856] scp hangs on FIFOs rather than erroring

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Sat May 1 19:31:25 EST 2004


http://bugzilla.mindrot.org/show_bug.cgi?id=856

           Summary: scp hangs on FIFOs rather than erroring
           Product: Portable OpenSSH
           Version: 3.8p1
          Platform: Other
               URL: http://bugs.debian.org/246774
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: scp
        AssignedTo: openssh-bugs at mindrot.org
        ReportedBy: cjwatson at debian.org


scp hangs if you ask it to copy a named pipe whose other end is closed, rather
than printing the "not a regular file" error the way it's supposed to.

strace shows that this is because it does open() then fstat(), but doing open()
on a closed FIFO hangs. Perhaps it should open with O_NONBLOCK? My open(2)
manual page says: "When possible, the file is opened in non-blocking mode.
Neither the open nor any subsequent operations on the file descriptor which is
returned will cause the calling process to wait."

See http://www.opengroup.org/onlinepubs/009695399/functions/open.html for
SuSv3/POSIX's description of O_NONBLOCK, which explicitly mentions its behaviour
on FIFOs, block specials, and character specials.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.




More information about the openssh-bugs mailing list