julia> redirect_stdout()
(Base.PipeEndpoint(RawFD(21) open, 0 bytes waiting), Base.PipeEndpoint(RawFD(22) open, 0 bytes waiting))
julia> print("asd")
julia> redirect_stderr()
(Base.PipeEndpoint(RawFD(23) open, 0 bytes waiting), Base.PipeEndpoint(RawFD(24) open, 0 bytes waiting))
julia> error("asd")
ERROR: asd
Stacktrace:
[1] error(::String) at ./error.jl:21
I also get a nasty segfault on 0.6 (I might not have the latest version) when calling it on remote workers:
julia> addprocs(1)
1-element Array{Int64,1}:
2
julia> remotecall_fetch(redirect_stderr,2)
(
signal (11): Segmentation fault: 11