Class: DockerToolkit::ChildProcess::Unix::Lib::FileActions
- Inherits:
- 
      Object
      
        - Object
- DockerToolkit::ChildProcess::Unix::Lib::FileActions
 
- Defined in:
- lib/docker_toolkit/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
#initialize ⇒ FileActions
Returns a new instance of FileActions.
| 101 102 103 104 | # File 'lib/docker_toolkit/childprocess/unix/lib.rb', line 101 def initialize @ptr = FFI::MemoryPointer.new(1, Platform::SIZEOF.fetch(:posix_spawn_file_actions_t), false) Lib.check Lib.posix_spawn_file_actions_init(@ptr) end | 
Instance Method Details
#add_close(fileno) ⇒ Object
| 106 107 108 109 110 111 | # File 'lib/docker_toolkit/childprocess/unix/lib.rb', line 106 def add_close(fileno) Lib.check Lib.posix_spawn_file_actions_addclose( @ptr, fileno ) end | 
#add_dup(fileno, new_fileno) ⇒ Object
| 123 124 125 126 127 128 129 | # File 'lib/docker_toolkit/childprocess/unix/lib.rb', line 123 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
| 113 114 115 116 117 118 119 120 121 | # File 'lib/docker_toolkit/childprocess/unix/lib.rb', line 113 def add_open(fileno, path, oflag, mode) Lib.check Lib.posix_spawn_file_actions_addopen( @ptr, fileno, path, oflag, mode ) end | 
#free ⇒ Object
| 131 132 133 134 | # File 'lib/docker_toolkit/childprocess/unix/lib.rb', line 131 def free Lib.check Lib.posix_spawn_file_actions_destroy(@ptr) @ptr = nil end | 
#to_ptr ⇒ Object
| 136 137 138 | # File 'lib/docker_toolkit/childprocess/unix/lib.rb', line 136 def to_ptr @ptr end |