GithubHelp home page GithubHelp logo

os x: callin device/tty support about term HOT 3 CLOSED

pkg avatar pkg commented on July 29, 2024
os x: callin device/tty support

from term.

Comments (3)

davecheney avatar davecheney commented on July 29, 2024

I use linux mainly, so this package is better tested there.

I'm not opposed to improving the support on darwin, I've only tested it
with Prolific or Arduino faux USB series devices. I'm not sure if
O_NONBLOCK is a good idea as the term.Term type implements blocking Read
and Write operations, and I suspect O_NONBLOCK will break that contract.

On Mon, Sep 28, 2015 at 3:30 PM, Liam Staskawicz [email protected]
wrote:

On OS X, only the callout device (/dev/cu.) is supported at the moment,
since callin device (/dev/tty
) typically requires either:

  • hw handshaking
  • opening the device with O_NONBLOCK and setting CLOCAL to indicate
    that hw handshaking should be ignored

CLOCAL is set in setSpeed(), so I was hoping to understand whether this
was intentional, or if adding O_NONBLOCK to the open flags would be
acceptable?

Otherwise at the moment, syscall.Open() blocks indefinitely when passing
in a callin device path.


Reply to this email directly or view it on GitHub
#10.

from term.

liamstask avatar liamstask commented on July 29, 2024

Gotcha, sounds good. Would you be open to a patch that opens with O_NONBLOCK, and follows up with syscall.SetNonblock(fd, false) before returning from Term.Open()?

from term.

liamstask avatar liamstask commented on July 29, 2024

resolved by #12

from term.

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.