🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

fdpass

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fdpass

0.1.2
Rubygems
Version published
Maintainers
1
Created
Source

= fdpass

== Description

This is a library to transmit the file descriptor between the processes.

== Install

gem install fdpass

== Example === Server (Reciever) require 'fdpass'

begin fdpass = FDPass.server('/tmp/fdpass.sock')

t = Thread.fork {
  loop do
    fd = fdpass.recv
    io = IO.open(fd)
    io.puts('%s: %s' % [fd, __FILE__])
    FDPass.close_fd(fd)
  end
}

t.join

ensure fdpass.close end

== Client (Sender) require 'fdpass'

begin fdpass = FDPass.client('/tmp/fdpass.sock') fdpass.send($stderr.fileno) ensure fdpass.close if fdpass.closed? end

FAQs

Package last updated on 09 Jan 2011

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts