Closed
Description
I'd like to run a process chain and wait for it to finish. Unfortunately it looks like:
- wait is not defined for process chains, and
- wait_success uses success() which defines success like this:
proc.exit_code==0 && (proc.term_signal == 0 || proc.term_signal == SIGPIPE)
Unfortunately, grep defines success as 0 or 1 (sigh):
EXIT STATUS
The grep utility exits with one of the following values:
0 One or more lines were selected.
1 No lines were selected.
>1 An error occurred.
Here's an example:
julia> x = readsfrom(`ls` |> `grep xxxxxx`)
(NamedPipe(closed, 0 bytes waiting),ProcessChain([Process(`ls`, ProcessExited(0)),Process(`grep xxxxxx`, ProcessExited(1))],SpawnNullStream(),NamedPipe(closed, 0 bytes waiting),TTY(open, 0 bytes waiting)))
julia> wait(x[2])
ERROR: no method wait(ProcessChain,)
julia> Base.wait_success(x[2])
false
Metadata
Metadata
Assignees
Labels
No labels