From: akr Date: 2012-03-18T18:42:52+09:00 Subject: [ruby-core:43430] [ruby-trunk - Feature #4057] FileUtils.copy with FIFOs and Special Devices Issue #4057 has been updated by akr. Description updated I feel following hang is bad behavior. % mkfifo p % ruby -v -rfileutils -e 'FileUtils.copy "p", "p2"' ruby 2.0.0dev (2012-03-16 trunk 35049) [x86_64-linux] ...hang... However cp also hangs. % cp p p2 ..hang... cp -a don't hang though. ---------------------------------------- Feature #4057: FileUtils.copy with FIFOs and Special Devices https://bugs.ruby-lang.org/issues/4057#change-24749 Author: runpaint Status: Open Priority: Low Assignee: Category: lib Target version: =begin In http://redmine.ruby-lang.org/repositories/diff/ruby-19?rev=6747 support for copying FIFOs and special devices was added to FileUtils.copy, and the same code exists in trunk. It relies on the existence of File.mknod and File.mkfifo. According to git's "pickaxe", those methods have never existed. Various patches to add this functionality have been sent to ruby-core, but in http://www.ruby-forum.com/topic/144168 matz rejected the idea. So, presumably, either these checks should be removed from FileUtils such that it raises an exception when a special device is encountered, or we should replace them with calls to the `mknod`/`mkfifo` commands. For me, the following just hangs: run@paint:~$ mkfifo fifo run@paint:~$ ruby -rfileutils -e 'FileUtils.copy("fifo", "lifo")' =end -- http://bugs.ruby-lang.org/