Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make copy methods handle FIFOs and UNIX sockets #36

Merged
merged 2 commits into from
Aug 6, 2019

Conversation

jeremyevans
Copy link
Contributor

Previously, this was broken. Trying to copy a FIFO would raise a
NoMethodError if File.mkfifo was defined. Trying to copy a UNIX
socket would raise a RuntimeError as File.mknod is not something
Ruby defines.

Handle the FIFO issue using File.mkfifo instead of mkfifo.

Handle the UNIX Socket issue by creating a unix socket.

Continue to not support character or block devices, raising a
RuntimeError for both.

Add tests for FIFO, UNIX Socket, and character/block devices.

Fixes Ruby Bug 10104.

Previously, this was broken.  Trying to copy a FIFO would raise a
NoMethodError if File.mkfifo was defined.  Trying to copy a UNIX
socket would raise a RuntimeError as File.mknod is not something
Ruby defines.

Handle the FIFO issue using File.mkfifo instead of mkfifo.

Handle the UNIX Socket issue by creating a unix socket.

Continue to not support character or block devices, raising a
RuntimeError for both.

Add tests for FIFO, UNIX Socket, and character/block devices.
@hsbt
Copy link
Member

hsbt commented Jul 14, 2019

@jeremyevans Can you skip test_cp_r_socket with JRuby platform?

@hsbt
Copy link
Member

hsbt commented Aug 6, 2019

Thanks!

@hsbt hsbt merged commit a409ca7 into ruby:master Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants