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

[feat] expose wait and try_wait on CommandChild #6634

Closed
ImUrX opened this issue Apr 4, 2023 · 7 comments
Closed

[feat] expose wait and try_wait on CommandChild #6634

ImUrX opened this issue Apr 4, 2023 · 7 comments
Labels
status: backlog Issue is ready and we can work on it type: feature request

Comments

@ImUrX
Copy link

ImUrX commented Apr 4, 2023

Describe the problem

I need to wait for a process to finish and the only way to do it is with the methods provided by Rust.

Describe the solution you'd like

Expose the functions from Child that let you do this

Alternatives considered

No response

Additional context

No response

@FabianLars FabianLars added the status: backlog Issue is ready and we can work on it label Apr 4, 2023
@Anujyadavg

This comment was marked as spam.

@Anujyadavg

This comment was marked as spam.

@amrbashir
Copy link
Member

So there is Command::output on the Rust side and Command::execute on the JS side which both will wait until the child is finished, is that not enough?

@ImUrX
Copy link
Author

ImUrX commented Aug 23, 2023

yeah thats a way to do it, but try_wait would be nice, and then if you have a try_wait why wouldnt you have a wait

@grzianod
Copy link

grzianod commented Sep 12, 2023

It is not enough for spawned processes that execute binaries that can run undefinitely and must be terminated with user-input (or signal/events such as screen recording tasks). It would be very nice to spawn the process, do something else and when necessary wait for the child process output. @amrbashir

@github-project-automation github-project-automation bot moved this to 📬Proposal in Roadmap Sep 26, 2023
@VanIseghemThomas
Copy link

+1 for this. I need this to check if a sidecar process unexpectedly closed. In that case the CommandChild object is still present.
Specifically I'm bumping into a similar situation as @grzianod mentioned where my process is terminated/started on user input.
Being able to run try_wait on it would allow me to verify this.

@FabianLars
Copy link
Member

superseeded by tauri-apps/plugins-workspace#1920

@FabianLars FabianLars closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: backlog Issue is ready and we can work on it type: feature request
Projects
Status: 📬Proposal
Development

No branches or pull requests

6 participants