diff --git a/base/process.jl b/base/process.jl index 0c7db8a405d20..e7a460b0e8ead 100644 --- a/base/process.jl +++ b/base/process.jl @@ -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) diff --git a/test/spawn.jl b/test/spawn.jl index dcc1bae234118..f44dfe43c8c3f 100644 --- a/test/spawn.jl +++ b/test/spawn.jl @@ -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)