Skip to content

Commit

Permalink
Merge pull request #9 from runletapp/master
Browse files Browse the repository at this point in the history
Fix child handle pointer
  • Loading branch information
iamacarpet authored Jun 26, 2019
2 parents 521e082 + bff8ba1 commit ae7e53a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion winpty.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func OpenWithOptions(options Options) (*WinPTY, error) {
spawnErr uintptr
lastError *uint32
)
spawnRet, _, _ := winpty_spawn.Call(wp, spawnCfg, uintptr(unsafe.Pointer(obj.childHandle)), uintptr(0), uintptr(unsafe.Pointer(lastError)), uintptr(unsafe.Pointer(spawnErr)))
spawnRet, _, _ := winpty_spawn.Call(wp, spawnCfg, uintptr(unsafe.Pointer(&obj.childHandle)), uintptr(0), uintptr(unsafe.Pointer(lastError)), uintptr(unsafe.Pointer(spawnErr)))
winpty_spawn_config_free.Call(spawnCfg)
defer winpty_error_free.Call(spawnErr)

Expand Down Expand Up @@ -152,3 +152,7 @@ func (obj *WinPTY) Close() {

obj.closed = true
}

func (obj *WinPTY) GetProcHandle() uintptr {
return obj.childHandle
}

0 comments on commit ae7e53a

Please sign in to comment.