Method: ChildProcess::Windows::Handle#exit_code

Defined in:
lib/childprocess/windows/handle.rb

#exit_codeObject



42
43
44
45
46
47
48
49
50
51
52
# File 'lib/childprocess/windows/handle.rb', line 42

def exit_code
  code_pointer = FFI::MemoryPointer.new :ulong
  ok = Lib.get_exit_code(@pointer, code_pointer)

  if ok
    code_pointer.get_ulong(0)
  else
    close
    raise Error, Lib.last_error_message
  end
end