Methods
Public Instance methods
[ show source ]
# File lib/phusion_passenger/utils.rb, line 545
545: def close_on_exec!
546: if defined?(Fcntl::F_SETFD)
547: fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
548: end
549: end
Receive an IO object (i.e. a file descriptor) from this IO channel. This only works if this IO channel is a Unix socket.
Raises SystemCallError if something went wrong.
[ show source ]
# File lib/phusion_passenger/utils.rb, line 540
540: def recv_io
541: return IO.new(PhusionPassenger::NativeSupport.recv_fd(self.fileno))
542: end
Send an IO object (i.e. a file descriptor) over this IO channel. This only works if this IO channel is a Unix socket.
Raises SystemCallError if something went wrong.
[ show source ]
# File lib/phusion_passenger/utils.rb, line 532
532: def send_io(io)
533: PhusionPassenger::NativeSupport.send_fd(self.fileno, io.fileno)
534: end