Class: ChildProcess::Unix::Lib::FileActions
- Inherits:
-
Object
- Object
- ChildProcess::Unix::Lib::FileActions
- Defined in:
- lib/childprocess/unix/lib.rb
Instance Method Summary collapse
- #add_close(fileno) ⇒ Object
- #add_dup(fileno, new_fileno) ⇒ Object
- #add_open(fileno, path, oflag, mode) ⇒ Object
- #free ⇒ Object
-
#initialize ⇒ FileActions
constructor
A new instance of FileActions.
- #to_ptr ⇒ Object
Constructor Details
Instance Method Details
#add_close(fileno) ⇒ Object
105 106 107 108 109 110 |
# File 'lib/childprocess/unix/lib.rb', line 105 def add_close(fileno) Lib.check Lib.posix_spawn_file_actions_addclose( @ptr, fileno ) end |
#add_dup(fileno, new_fileno) ⇒ Object
122 123 124 125 126 127 128 |
# File 'lib/childprocess/unix/lib.rb', line 122 def add_dup(fileno, new_fileno) Lib.check Lib.posix_spawn_file_actions_adddup2( @ptr, fileno, new_fileno ) end |
#add_open(fileno, path, oflag, mode) ⇒ Object
112 113 114 115 116 117 118 119 120 |
# File 'lib/childprocess/unix/lib.rb', line 112 def add_open(fileno, path, oflag, mode) Lib.check Lib.posix_spawn_file_actions_addopen( @ptr, fileno, path, oflag, mode ) end |
#free ⇒ Object
130 131 132 133 |
# File 'lib/childprocess/unix/lib.rb', line 130 def free Lib.check Lib.posix_spawn_file_actions_destroy(@ptr) @ptr = nil end |
#to_ptr ⇒ Object
135 136 137 |
# File 'lib/childprocess/unix/lib.rb', line 135 def to_ptr @ptr end |