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

Calling close when process is still alive #98

Open
Aidan63 opened this issue Aug 28, 2024 · 0 comments
Open

Calling close when process is still alive #98

Aidan63 opened this issue Aug 28, 2024 · 0 comments

Comments

@Aidan63
Copy link
Owner

Aidan63 commented Aug 28, 2024

One I found while going over some libuv docs, you shouldn't call uv_close on a process before its exit callback has arrived, doing this doesn't result in an error but leaves the process in some sort of weird state... (libuv/libuv#1911)
While I'm sure there are good reasons why they implemented things that way it is thorougly unintuative and seems like an accident waiting to happen.
I think it would make sense if we say that calling close on a process still alive will kill it. So we'd need to some some tracking so on a close call we'd see if we need to issue kill the process and wait for its exit before doing cleanup and invoking the provided callback.

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

No branches or pull requests

1 participant