Class: ChildProcess::Unix::Lib::Attrs

### Home Classes Methods

### In Files

- lib/childprocess/unix/lib.rb

### Parent

Object

### Methods

- ::new
- #flags
- #flags=
- #free
- #pgroup=
- #to_ptr

### Class/Module Index

Quicksearch

- ChildProcess
- ChildProcess::AbstractIO
- ChildProcess::AbstractProcess
- ChildProcess::Error
- ChildProcess::InvalidEnvironmentVariable
- ChildProcess::JRuby
- ChildProcess::JRuby::IO
- ChildProcess::JRuby::Process
- ChildProcess::JRuby::Pump
- ChildProcess::LaunchError
- ChildProcess::MissingPlatformError
- ChildProcess::SubclassResponsibility
- ChildProcess::TimeoutError
- ChildProcess::Tools
- ChildProcess::Tools::Generator
- ChildProcess::Unix
- ChildProcess::Unix::ForkExecProcess
- ChildProcess::Unix::IO
- ChildProcess::Unix::Lib
- ChildProcess::Unix::Lib::Attrs
- ChildProcess::Unix::Lib::FileActions
- ChildProcess::Unix::Platform
- ChildProcess::Unix::PosixSpawnProcess
- ChildProcess::Unix::PosixSpawnProcess::Argv
- ChildProcess::Unix::PosixSpawnProcess::Envp
- ChildProcess::Unix::Process
- ChildProcess::Windows
- ChildProcess::Windows::Handle
- ChildProcess::Windows::IO
- ChildProcess::Windows::IoCounters
- ChildProcess::Windows::JobObjectBasicLimitInformation
- ChildProcess::Windows::JobObjectExtendedLimitInformation
- ChildProcess::Windows::Lib
- ChildProcess::Windows::Process
- ChildProcess::Windows::Process::Job
- ChildProcess::Windows::ProcessBuilder
- ChildProcess::Windows::ProcessInfo
- ChildProcess::Windows::SecurityAttributes
- ChildProcess::Windows::StartupInfo
- Java
- Java::JavaIo
- Java::JavaIo::FileDescriptor
- Java::SunNioCh
- Java::SunNioCh::FileChannelImpl
- FFI
- FFI::MemoryPointer

No matching classes.

# ChildProcess::Unix::Lib::Attrs

### Public Class Methods

new() click to toggle source

    # File lib/childprocess/unix/lib.rb, line 141
    def initialize
      @ptr = FFI::MemoryPointer.new(1, Platform::SIZEOF.fetch(:posix_spawnattr_t), false)
      Lib.check Lib.posix_spawnattr_init(@ptr)
    end

### Public Instance Methods

flags() click to toggle source

    # File lib/childprocess/unix/lib.rb, line 155
    def flags
      ptr = FFI::MemoryPointer.new(:short)
      Lib.check Lib.posix_spawnattr_getflags(@ptr, ptr)

      ptr.read_short
    end

flags=(flags) click to toggle source

    # File lib/childprocess/unix/lib.rb, line 151
    def flags=(flags)
      Lib.check Lib.posix_spawnattr_setflags(@ptr, flags)
    end

free() click to toggle source

    # File lib/childprocess/unix/lib.rb, line 146
    def free
      Lib.check Lib.posix_spawnattr_destroy(@ptr)
      @ptr = nil
    end

pgroup=(pid) click to toggle source

    # File lib/childprocess/unix/lib.rb, line 162
    def pgroup=(pid)
      self.flags |= Platform::POSIX_SPAWN_SETPGROUP
      Lib.check Lib.posix_spawnattr_setpgroup(@ptr, pid)
    end

to_ptr() click to toggle source

    # File lib/childprocess/unix/lib.rb, line 167
    def to_ptr
      @ptr
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.