class DockerToolkit::ChildProcess::Unix::Lib::Attrs

Public Class Methods

new() click to toggle source
# File lib/docker_toolkit/childprocess/unix/lib.rb, line 142
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/docker_toolkit/childprocess/unix/lib.rb, line 156
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/docker_toolkit/childprocess/unix/lib.rb, line 152
def flags=(flags)
  Lib.check Lib.posix_spawnattr_setflags(@ptr, flags)
end
free() click to toggle source
# File lib/docker_toolkit/childprocess/unix/lib.rb, line 147
def free
  Lib.check Lib.posix_spawnattr_destroy(@ptr)
  @ptr = nil
end
pgroup=(pid) click to toggle source
# File lib/docker_toolkit/childprocess/unix/lib.rb, line 163
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/docker_toolkit/childprocess/unix/lib.rb, line 168
def to_ptr
  @ptr
end