Skip to content

Conversation

@wofanli
Copy link

@wofanli wofanli commented Jun 23, 2018

After Killing a thread, the thread is leaved as Zombie state. Need to invoke Wait/Release syscall to release the resource.

Below are the code snip from golang:

// Release releases any resources associated with the Process p,
// rendering it unusable in the future.
// Release only needs to be called if Wait is not.
func (p *Process) Release() error {
    return p.release()
}

// Kill causes the Process to exit immediately.
func (p *Process) Kill() error {
    return p.kill()
}

// Wait waits for the Process to exit, and then returns a
// ProcessState describing its status and an error, if any.
// Wait releases any resources associated with the Process.
// On most operating systems, the Process must be a child
// of the current process or an error will be returned.
func (p *Process) Wait() (*ProcessState, error) {
    return p.wait()
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant