# File lib/childprocess/windows/handle.rb, line 8 def open(pid, access = PROCESS_ALL_ACCESS) handle = Lib.open_process(access, false, pid) if handle.null? raise Error, Lib.last_error_message end h = new(handle, pid) return h unless block_given? begin yield h ensure h.close end end