Giter VIP home page Giter VIP logo

Comments (4)

fiatjaf avatar fiatjaf commented on June 7, 2024

Do you know how to fix it?
Just calling FS.close on these streams?

from jq-web.

zhangweis avatar zhangweis commented on June 7, 2024

I've tried commenting the 2 lines and seems no negative impacts happened. Is it for large content or something?

from jq-web.

fiatjaf avatar fiatjaf commented on June 7, 2024

I don't remember. All I have are the same hints you do:

jq-web/post.js

Lines 17 to 21 in cf1752c

Module.callMain(flags.concat(filter))
// calling main closes stdout, so we reopen it here:
FS.streams[1] = FS.open('/dev/stdout', 577, 0)
FS.streams[2] = FS.open('/dev/stderr', 577, 0)

"calling main closes stdout, so we reopen here".

Maybe this means the negative impacts would only be felt in the second run?
Or maybe this was an emscripten bug that was fixed already, so main isn't closing the streams anymore as it did before, that's why they're being kept open now and causing issues.

from jq-web.

zhangweis avatar zhangweis commented on June 7, 2024

I'm using a fix like below and so far it works for me.

        var stream1,stream2;
        stream1=FS.open("/dev/stdout",577,0);stream2=FS.open("/dev/stderr",577,0);
        setTimeout(()=>{FS.close(stream1);FS.close(stream2);},10000);

from jq-web.

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.