Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the closed threads are leaved as Zombie state #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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