-
Notifications
You must be signed in to change notification settings - Fork 7
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
FEATURE REQUEST: Callback or blocking method to wait for exit of spawned process #72
Comments
Hi @jakob-ledermann, thanks for the suggestion. Right now the only way to test if a process is still "alive" is by trying to read from it in a blocking fashion, once the process finishes, the function will Err, which is similar to the functionality you are requesting for. Line 461 in 4799bdc
Line 403 in 4799bdc
We could add a method |
I agree that reacting to the error from Replicating a Microsofts dotnet does provide an event The Callback is registered with the Windows API in So it looks like a method As far as I see there is currently no way to implement this outside the library as the native process handle can not be obtained. |
Using |
Currently there does not seem to be an easy way to wait for the spawned process to exit.
I do not see a better way to call the
quit_cb
callback, when the spawned process exits in https://github.com/jakob-ledermann/zellij/blob/445ee782e398aac34b4a4b7cedf386fa1d5c31f6/zellij-server/src/os_input_output.rs#L310The unix implementation can be found here and uses
.wait()
to block until the child process has exited.The text was updated successfully, but these errors were encountered: