-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
processchain wait/wait_success issues #3846
Comments
Since grep defined success as 0, I don't understand the bug. wait_success also uses wait_exit, which should not check any status codes, and success should be respecting the ignorestatus function call for a cmd. wait is not defined as it is ambiguous. Can you clarify your issue? |
|
That logic flows equally well in the opposite direction and should not be the basis for an argument. I suppose that wait is not defined for ProcessChain so it should not be defined for Process either. I had remove the concept of a generic wait for processes and process chains (for the libuv fork), because it was a source of confusion and a few bugs in the handling of processes a year ago due to the ambiguity. I was not aware that it had been redefined, and recommend it be removed (e.g. revert d94d15f). |
I said could, not should. Perhaps the most fundamental operation on a child process is to wait for it to exit and get the exit code, so we need to have that. What is the source of the ambiguity? Should we instead use |
For example: Is it waiting on the first, last, or all processes? Are you waiting for them to be started or to exit? Are you waiting for them to be able to accept data, or to be able to read data from the output? all data, or any data? Yes, wait_exit could return the exit code, similar to how wait_success returns the success code. I think we might be able to do something of the form |
Grep defines success as 0 or 1. See my clip of the man page for grep. 0 - found something thanks, On Jul 26, 2013, at 11:57 PM, Jameson Nash notifications@github.com wrote:
|
I'm waiting for exit of the whole processchain (in this case a pipeline). Btw wait_success is not exported explicitly. It doesn't look like it is supposed to be called directly? thanks, On Jul 27, 2013, at 1:56 AM, Jameson Nash notifications@github.com wrote:
|
Sorry, I should have been more clear. There are two problems:
Note that status >1 indicates error. 1 indicates that grep has empty results. Since this is program specific, is there a way to specificy a custom condition on the Process object to interpret it's return code?
|
@vtjnash I'm not totally convinced --- historically, wait/waitpid wait for processes to exit. Waiting for a process to start is not really a thing. If you're waiting for data, you'd be using one of the process' i/o streams and not the process itself. It also seems clear, at a high level, that waiting for a process chain means waiting for the whole thing (which in practice means waiting for the last process). Waiting for a process in the middle of a chain would be a fairly exotic case. |
Now |
…7952e (#53762) Stdlib: Pkg URL: https://github.com/JuliaLang/Pkg.jl.git Stdlib branch: release-1.11 Julia branch: backports-release-1.11 Old commit: 1e6fa605f New commit: bd787952e Julia version: 1.11.0-alpha1 Pkg version: 1.11.0 Bump invoked by: @IanButterworth Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaLang/Pkg.jl@1e6fa60...bd78795 ``` $ git log --oneline 1e6fa605f..bd787952e bd787952e Merge pull request #3846 from JuliaLang/backports-release-1.11 239702022 precompile: update kwargs (#3838) 4ea3f3576 move threads assignment after precompilation (#3840) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
I'd like to run a process chain and wait for it to finish. Unfortunately it looks like:
Unfortunately, grep defines success as 0 or 1 (sigh):
Here's an example:
The text was updated successfully, but these errors were encountered: