Stdout is no longer filtered
This commit is contained in:
parent
993633886a
commit
00ef33a8a6
@ -184,7 +184,6 @@ mutable struct GPSession <: Session
|
|||||||
plots::Vector{SinglePlot} # commands and plot commands (one entry for each plot of the multiplot)
|
plots::Vector{SinglePlot} # commands and plot commands (one entry for each plot of the multiplot)
|
||||||
curmid::Int # current multiplot ID
|
curmid::Int # current multiplot ID
|
||||||
pin::Base.Pipe;
|
pin::Base.Pipe;
|
||||||
pout::Base.Pipe;
|
|
||||||
perr::Base.Pipe;
|
perr::Base.Pipe;
|
||||||
proc::Base.Process;
|
proc::Base.Process;
|
||||||
channel::Channel{String};
|
channel::Channel{String};
|
||||||
@ -510,24 +509,20 @@ function GPSession(sid::Symbol)
|
|||||||
end
|
end
|
||||||
|
|
||||||
pin = Base.Pipe()
|
pin = Base.Pipe()
|
||||||
pout = Base.Pipe()
|
|
||||||
perr = Base.Pipe()
|
perr = Base.Pipe()
|
||||||
proc = run(pipeline(`$(options.cmd)`, stdin=pin, stdout=stdout, stderr=perr), wait=false)
|
proc = run(pipeline(`$(options.cmd)`, stdin=pin, stdout=stdout, stderr=perr), wait=false)
|
||||||
chan = Channel{String}(32)
|
chan = Channel{String}(32)
|
||||||
|
|
||||||
# Close unused sides of the pipes
|
# Close unused sides of the pipes
|
||||||
Base.close(pout.in)
|
|
||||||
Base.close(perr.in)
|
Base.close(perr.in)
|
||||||
Base.close(pin.out)
|
Base.close(pin.out)
|
||||||
Base.start_reading(pout.out)
|
|
||||||
Base.start_reading(perr.out)
|
Base.start_reading(perr.out)
|
||||||
|
|
||||||
# Start reading tasks
|
# Start reading tasks
|
||||||
#@async readTask(sid, pout, chan, :out)
|
|
||||||
@async readTask(sid, perr, chan)
|
@async readTask(sid, perr, chan)
|
||||||
|
|
||||||
out = GPSession(getfield.(Ref(session), fieldnames(DrySession))...,
|
out = GPSession(getfield.(Ref(session), fieldnames(DrySession))...,
|
||||||
pin, pout, perr, proc, chan)
|
pin, perr, proc, chan)
|
||||||
sessions[sid] = out
|
sessions[sid] = out
|
||||||
|
|
||||||
return out
|
return out
|
||||||
@ -867,7 +862,6 @@ end
|
|||||||
|
|
||||||
function quit(gp::GPSession)
|
function quit(gp::GPSession)
|
||||||
close(gp.pin)
|
close(gp.pin)
|
||||||
close(gp.pout)
|
|
||||||
close(gp.perr)
|
close(gp.perr)
|
||||||
wait( gp.proc)
|
wait( gp.proc)
|
||||||
exitCode = gp.proc.exitcode
|
exitCode = gp.proc.exitcode
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user