Sha256: 2c8c9fc71e584186516be017b7dbcc9d83c016c4de11a084203c70fabbf97471
Contents?: true
Size: 302 Bytes
Versions: 41
Compression:
Stored size: 302 Bytes
Contents
module PipeForker def pipe_fork stdin = Pipe.new(*IO.pipe) pid = fork do stdin.write.close STDIN.reopen(stdin.read) stdin.read.close yield exit end stdin.read.close return pid, stdin.write end private Pipe = Struct.new(:read, :write) end
Version data entries
41 entries across 41 versions & 1 rubygems