Class | IO |
In: |
lib/phusion_passenger/utils.rb
|
Parent: | Object |
# File lib/phusion_passenger/utils.rb, line 457 457: def close_on_exec! 458: if defined?(Fcntl::F_SETFD) 459: fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) 460: end 461: 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.
# File lib/phusion_passenger/utils.rb, line 452 452: def recv_io 453: return IO.new(PhusionPassenger::NativeSupport.recv_fd(self.fileno)) 454: 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.
# File lib/phusion_passenger/utils.rb, line 444 444: def send_io(io) 445: PhusionPassenger::NativeSupport.send_fd(self.fileno, io.fileno) 446: end