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
wait for processes by their name #4849
Conversation
- You can now specify the process name instead of process ids and wait for jobs. - Refactor the code of wait command
Nice tests! Can you please update |
I reflected the changes to |
Although I committed the fix for the bug, I think I misunderstood the error in test. I expect the behaviour like below:
However, the failed test seems to behave
Was one of the jobs finished immediately? In the log file in failed test,
is printed, but |
If you run |
I cannot reproduce the bug although I tried the test many times :_( After merging the current master branch I run the script below, but it never breaks in my environment.
How do we deal with this bug? |
Urgh... Sorry, I missed a change in the tests, which is why they are now failing! Readding that line! |
I think waiting for processes by name is messy and brittle and job ids should always be used. |
Introduced by #4849 (add wait for processes by name) ../src/builtin_wait.cpp:23:14: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] while (j = jobs.next()) { ~~^~~~~~~~~~~~~ ../src/builtin_wait.cpp:23:14: note: place parentheses around the assignment to silence this warning while (j = jobs.next()) { ^ ( ) ../src/builtin_wait.cpp:23:14: note: use '==' to turn this assignment into an equality comparison while (j = jobs.next()) { ^ == 1 warning generated.
Implement #4848 and refactored the code in wait command.
We can now specify the process name and wait for jobs with its name, like:
TODOs: