Sha256: 9b2479e6e5f2803535d8620fb1c7da8a828b066f6e25bcc6452381a181ddb577

Contents?: true

Size: 881 Bytes

Versions: 1

Compression:

Stored size: 881 Bytes

Contents

require 'ffi'

module RPS
  class MacOSXProcess
    module Lib
      extend FFI::Library
      ffi_lib FFI::CURRENT_PROCESS

      CTL_KERN      = 1
      KERN_PROC     = 14
      KERN_PROC_ALL = 0
      
      attach_function :sysctl, [:pointer, :uint, :pointer, :pointer, :pointer, :size_t], :int
    end
    
    
    def self.all
      raise NotImplementedError
      
      mib = [Lib::CTL_KERN, Lib::KERN_PROC, Lib::KERN_PROC_ALL, 0]
      mip = FFI::MemoryPointer.new(:int, mib.size).write_array_of_int(mib)
      
      # meh. struct too much for bsd.
    end

    def readable?
      raise NotImplementedError
    end

    def ruby?
      raise NotImplementedError
    end

    def exe
      raise NotImplementedError
    end

    def pid
      raise NotImplementedError
    end

    def command_line
      raise NotImplementedError
    end
  end # MacOSXProcess
end # RPS

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rps-0.0.3 lib/rps/macosx_process.rb