Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

`node < /dev/tty` doesn't seem to work as expected on OSX #3072

Closed
TooTallNate opened this Issue · 20 comments

6 participants

@TooTallNate
Owner

https://gist.github.com/681256e480d4e8eae52d

Basically, I'm expecting to enter the REPL as usual, and basically the initial prompt gets printed and no keyboard input gets recognized at all.

read(1) seems to work as expected (as seen in the gist), so I would think at least in NODE_NO_READLINE mode would as, but that doesn't seem to work either.

This seems to only happen on OS X and works fine on Ubuntu.

@TooTallNate
Owner

After further investigation this appears to have been fixed by b6d6a54, which will be in the v0.7.8 release.

@TooTallNate TooTallNate closed this
@isaacs isaacs reopened this
@isaacs
Owner

b6d6a54 was reverted by 93eca95, because it caused #3075. Need to find another way to fix this.

@ssuda ssuda referenced this issue from a commit in ssuda/node
@isaacs isaacs Revert "build: target OSX 10.5 when building on darwin"
This reverts commit b6d6a54,
which fixed #3072, so we'll have to figure out another way
to make that work.
93eca95
@TooTallNate TooTallNate closed this issue from a commit
@TooTallNate TooTallNate Re-apply "build: target OSX 10.5 when building on darwin"
This reverts commit 93eca95.

Fixes #3072 (once again).
70a5b53
@TooTallNate TooTallNate reopened this
@TooTallNate
Owner

It seems like applying -mmacosx-version-min=10.5 fixed things up until 0db4dc0 was applied. Now it seems like the flag doesn't help anymore, and I still get the hang on ./node < /dev/tty. /cc @bnoordhuis

@Skomski Skomski referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@Skomski Skomski referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@TooTallNate
Owner

Appears to be fixed now.

@ErikDubbelboer ErikDubbelboer referenced this issue from a commit
@isaacs isaacs Revert "build: target OSX 10.5 when building on darwin"
This reverts commit b6d6a54,
which fixed #3072, so we'll have to figure out another way
to make that work.
17875e8
@ErikDubbelboer ErikDubbelboer referenced this issue from a commit
@TooTallNate TooTallNate Re-apply "build: target OSX 10.5 when building on darwin"
This reverts commit 93eca95.

Fixes #3072 (once again).
1550117
@TooTallNate
Owner

This seems to be happening again using node master (82bcdbb). Only now it's worse, getting an assertion failure from within libuv:

☮ ~/node (master) ⚡ ./node < /dev/tty
> Assertion failed: (!!(events & UV__IO_READ) ^ !!(events & UV__IO_WRITE)), function uv__stream_io, file ../deps/uv/src/unix/stream.c, line 730.
Abort trap: 6

/cc @bnoordhuis

@TooTallNate TooTallNate reopened this
@bnoordhuis

@TooTallNate: WFM. To wit:

$ out/Debug/node < /dev/tty
> 1+1
2
> 2+2
4
@isaacs
Owner

It works on linux and sunos, not on osx.

@isaacs isaacs closed this issue from a commit
@isaacs isaacs Revert "build: target OSX 10.5 when building on darwin"
This reverts commit b6d6a54,
which fixed #3072, so we'll have to figure out another way
to make that work.
93eca95
@isaacs isaacs closed this in 93eca95
@TooTallNate TooTallNate reopened this
@TooTallNate
Owner

Still happens as of v0.7.10:

$ node -v
v0.7.10
$ node < /dev/tty
> Assertion failed: (!!(events & UV__IO_READ) ^ !!(events & UV__IO_WRITE)), function uv__stream_io, file ../deps/uv/src/unix/stream.c, line 732.
Abort trap: 6
@TooTallNate
Owner

git bisect says that joyent/node@37fd953 (a.k.a joyent/libuv@3c41597) broke it again.

@TooTallNate TooTallNate referenced this issue in asyncly/cdir
Merged

piping support #22

@bnoordhuis

@TooTallNate Sorry, I kind of lost track of this issue. Does it still happen?

@TooTallNate
Owner
@bnoordhuis bnoordhuis was assigned
@bnoordhuis

Deal. :-) I'll work on it next week - I sent my old MBP back to Joyent and I haven't bought a new one yet.

@brntbeer

:+1: for @bnoordhuis to fix it 3 weeks ago

@chewbranca

Ran into this as well on OSX 10.7. Would love to see this fixed!

@indutny
Owner

Fix is there, still polishing it out: https://github.com/joyent/libuv/pull/528/files

@TooTallNate
Owner

Fixed in master.

This was referenced
@TooTallNate
Owner

So I guess @indutny's select() stuff got reverted? This happens again now with v0.9.4.

@TooTallNate TooTallNate reopened this
@indutny
Owner

Ah, no. it doesn't.

@TooTallNate
Owner

Works as expected in node v0.10.7 (just the version I was on at the moment, it's probably been fixed for a while). Closing.

@TooTallNate TooTallNate closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.