Git Product home page Git Product logo

Comments (11)

ioquatix avatar ioquatix commented on August 30, 2024

FYI, here is my exact line of code:

@child = ChildPTY.spawn(args[0], args.slice(1), cwd: cwd, env: env, stdio: ['pipe', 'pty', 'pty'])

from child_pty.

ioquatix avatar ioquatix commented on August 30, 2024

Atom Version: 1.12.6
Electron Version: 1.3.9
System: linux 4.8.12-2-ARCH
Thrown From: script-runner package, v2.0.0

Stack Trace

Uncaught Error: spawn /usr/bin/env EFAULT

At events.js:160

Error: spawn /usr/bin/env EFAULT
    at Object.exports._errnoException (util.js:1026:11)
    at Socket.<anonymous> (/home/samuel/.atom/packages/script-runner/node_modules/child_pty/lib/child_pty.js:108:15)
    at Socket.g (events.js:286:16)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at Pipe.onread (net.js:543:20)

from child_pty.

Gottox avatar Gottox commented on August 30, 2024

Thanks for this report. I'm able to reproduce this issue.

from child_pty.

ioquatix avatar ioquatix commented on August 30, 2024

Thanks looking forward to an updaye

from child_pty.

ioquatix avatar ioquatix commented on August 30, 2024

Is the exechelper really necessary? Couldn't you do most of the work in NAN_METHOD(Open) in pty.cpp?

from child_pty.

Gottox avatar Gottox commented on August 30, 2024

Unfortunately, yes it is neccassary. You have to call TIOCSCTTY to set the controlling pty after the new process is forked. And as forking/executing is done by node and we cannot hook anything in between fork and exec I have to use this wrapper.

Actually that's the problem why your program does not work: I foolishly assumed, that stdin is always the pty which isn't true for your case.

I'm unavailable at the weekend, so expect a fix at sunday.

from child_pty.

derhuerst avatar derhuerst commented on August 30, 2024

bump. (:

from child_pty.

Gottox avatar Gottox commented on August 30, 2024

463f063 fixed, please test 3.0.5

from child_pty.

ioquatix avatar ioquatix commented on August 30, 2024

Awesome :)

from child_pty.

Gottox avatar Gottox commented on August 30, 2024

Damn, give me a sec and wait for 3.0.6 :D

from child_pty.

Gottox avatar Gottox commented on August 30, 2024

done, please check and reopen if anything fails! Sorry for the long delay!

from child_pty.

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.