Class: Aggkit::ChildProcess::Unix::Lib::Attrs
- Inherits:
-
Object
- Object
- Aggkit::ChildProcess::Unix::Lib::Attrs
- Defined in:
- lib/aggkit/childprocess/unix/lib.rb
Overview
FileActions
Instance Method Summary collapse
- #flags ⇒ Object
- #flags=(flags) ⇒ Object
- #free ⇒ Object
-
#initialize ⇒ Attrs
constructor
A new instance of Attrs.
- #pgroup=(pid) ⇒ Object
- #to_ptr ⇒ Object
Constructor Details
Instance Method Details
#flags ⇒ Object
156 157 158 159 160 161 |
# File 'lib/aggkit/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) ⇒ Object
152 153 154 |
# File 'lib/aggkit/childprocess/unix/lib.rb', line 152 def flags=(flags) Lib.check Lib.posix_spawnattr_setflags(@ptr, flags) end |
#free ⇒ Object
147 148 149 150 |
# File 'lib/aggkit/childprocess/unix/lib.rb', line 147 def free Lib.check Lib.posix_spawnattr_destroy(@ptr) @ptr = nil end |
#pgroup=(pid) ⇒ Object
163 164 165 166 |
# File 'lib/aggkit/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 ⇒ Object
168 169 170 |
# File 'lib/aggkit/childprocess/unix/lib.rb', line 168 def to_ptr @ptr end |