summaryrefslogtreecommitdiff
path: root/spec/rubyspec/core/process/fixtures/map_fd.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/rubyspec/core/process/fixtures/map_fd.rb')
-rw-r--r--spec/rubyspec/core/process/fixtures/map_fd.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/rubyspec/core/process/fixtures/map_fd.rb b/spec/rubyspec/core/process/fixtures/map_fd.rb
new file mode 100644
index 0000000000..fc542625b0
--- /dev/null
+++ b/spec/rubyspec/core/process/fixtures/map_fd.rb
@@ -0,0 +1,8 @@
+fd = ARGV.shift.to_i
+
+f = File.for_fd fd
+begin
+ f.write "writing to fd: #{fd}"
+ensure
+ f.close
+end