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

Jobs should be marked as completed when all processes are completed, not just the last one #876

Closed
ridiculousfish opened this issue Jun 16, 2013 · 1 comment
Milestone

Comments

@ridiculousfish
Copy link
Member

This issue tracks the following change: mark a job as completed only when all processes are finished.

An example of an affected command:

 sleep 10 | echo Hi

Today in fish, this finishes immediately, because echo does not read from its input pipe. With this change, this job will not finish for 10 seconds.

Advantages:

  1. It's arguably more intuitive
  2. It makes it possible to implement pipefail (add pipefail #763), because we will wait until we have the exit status of all commands in the pipeline
  3. It eliminates a certain class of race conditions that occur if the last process is not in the process group of the session leader (pwd | pwd crashes #848)
  4. It matches bash and zsh (though not tcsh)
@ridiculousfish
Copy link
Member Author

Trying it and seeing how it works out. Fixed as 5d75ee7

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant