Giter VIP home page Giter VIP logo

Comments (2)

dmolina avatar dmolina commented on July 20, 2024

I do not understand well your proposal. Could you give a more detailed suggestion?

from daemonmode.jl.

feanor12 avatar feanor12 commented on July 20, 2024

If a script has the following lines

println(stdout,"normal message")
println(stderr,"error message")

Both of the outputs are sent to sock. In a regular script the output could be separated by using
julia script.jl &2> /dev/null which pipes stderr into /dev/null.

The redirection can be seen for example here:

function serverRun(run, sock, shared, print_stack)
redirect_stdout(sock) do
redirect_stderr(sock) do
try
if shared
run(Main)
else
m = Module()
add_include = Meta.parse("include(arg)=Base.include(@__MODULE__,arg)")
Base.eval(m, add_include)
run(m)
end
println(sock, token_end)
catch e
if print_stack
serverReplyError(sock, e, catch_backtrace())
else
serverReplyError(sock, e)
end
end
end
end
end

I don't need this at the moment and I think the implementation could be tricky, but I guess it could be useful. One way I see would be to encapsulate the two outputs on the sock stream. The other might be to use a second channel.

As a workaround one might use Suppressor.jl inside the script.

from daemonmode.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.