Class IO
In: lib/phusion_passenger/utils.rb
Parent: Object

Methods

Public Instance methods

[Source]

     # File lib/phusion_passenger/utils.rb, line 546
546:         def close_on_exec!
547:                 if defined?(Fcntl::F_SETFD)
548:                         fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
549:                 end
550:         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.

[Source]

     # File lib/phusion_passenger/utils.rb, line 541
541:                 def recv_io
542:                         return IO.new(PhusionPassenger::NativeSupport.recv_fd(self.fileno))
543:                 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.

[Source]

     # File lib/phusion_passenger/utils.rb, line 533
533:                 def send_io(io)
534:                         PhusionPassenger::NativeSupport.send_fd(self.fileno, io.fileno)
535:                 end

[Validate]