Methods
Public Instance methods
[ show source ]
# File lib/phusion_passenger/utils.rb, line 450 450: def close_on_exec! 451: if defined?(Fcntl::F_SETFD) 452: fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) 453: end 454: 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 445 445: def recv_io 446: return IO.new(PhusionPassenger::NativeSupport.recv_fd(self.fileno)) 447: 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 437 437: def send_io(io) 438: PhusionPassenger::NativeSupport.send_fd(self.fileno, io.fileno) 439: end