-
Notifications
You must be signed in to change notification settings - Fork 2.1k
bg behaves differently depending on order of arguments if any are invalid #3909
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
Comments
My apologies, @zanchey, for what follows but I think it is important. I hate to be pedantic but by definition these jobs are already backgrounded since you can type a command. Which means those jobs are not in the foreground. What is really being discussed is whether one, some, or none of the jobs should be resumed in the background in light of a Commands like |
Like I said in a comment in #3906, this is what I'd prefer:
This is simple and predictable. |
@faho's suggestion is very good.
fail-fast and idempotency have some tension, and @faho threads the needle perfectly in my opinion. |
- Error out if anything that is not a PID is given - Otherwise background all matching existing jobs, even if not all PIDs exist Fixes fish-shell#3909.
- Error out if anything that is not a PID is given - Otherwise background all matching existing jobs, even if not all PIDs exist (but print a message for the non-existing ones) Fixes fish-shell#3909.
Let's say you have some jobs:
For whatever reason, I decide to background them all with manually-specified PGIDs. Unfortunately, I fat-finger one of the PGIDs. What is the difference between these commands?
If you said each one only backgrounds one process, and it's different between the two, you are correct!
I don't think this is sensible. Either all valid PGIDs should be backgrounded, or none should. Order should not matter.
(The new
disown
builtin disowns all valid PGIDs, but returns an error if any of the PGIDs are invalid.)The text was updated successfully, but these errors were encountered: