Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion base/process.jl
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ function test_success(proc::Process)
#TODO: this codepath is not currently tested
throw(_UVError("could not start process " * repr(proc.cmd), proc.exitcode))
end
return proc.exitcode == 0 && (proc.termsignal == 0 || proc.termsignal == SIGPIPE)
return proc.exitcode == 0 && proc.termsignal == 0
end

function success(x::Process)
Expand Down
4 changes: 2 additions & 2 deletions test/spawn.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ out = read(`$echocmd hello` & `$echocmd world`, String)

@test (run(`$printfcmd " \033[34m[stdio passthrough ok]\033[0m\n"`); true)

# Test for SIGPIPE being treated as normal termination (throws an error if broken)
Sys.isunix() && run(pipeline(yescmd, `head`, devnull))
# Test for SIGPIPE being a failure condition
@test_throws ProcessFailedException run(pipeline(yescmd, `head`, devnull))

let p = run(pipeline(yescmd, devnull), wait=false)
t = @async kill(p)
Expand Down