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

"pitchfork wait" is not waiting #20

Open
cjhardekopf opened this issue Jan 18, 2025 · 0 comments
Open

"pitchfork wait" is not waiting #20

cjhardekopf opened this issue Jan 18, 2025 · 0 comments

Comments

@cjhardekopf
Copy link

"pitchfork wait" is not working. If you have a running daemon and attempt to use "pitchfork wait" it returns instantly instead of waiting for the daemon to stop running.

I ran a simple test for this:

$ pitchfork run sleep -- sleep 120 # Just start a daemon that should run for a while before finishing
$ pitchfork wait sleep # Attempt to wait for it to stop, but instead it returns instantly
$ pitchfork ls # Verify that the "sleep" daemon is still running

Looking at "src/cli/wait.rs" I think that the break condition for the loop is reversed:

    loop {
        if PROCS.is_running(pid) {
            break;
        }
        interval.tick().await;
        PROCS.refresh_processes();
    }

I think that it should break when the process is not running.

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

No branches or pull requests

1 participant