-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Luvit aborts when redirecting output to file #1083
Comments
My first guess is that this is related to luvit/luv#437, but I need to look into it more to be sure exactly how. Some slightly interesting things to note:
|
Minimal reproduction with just local uv = require('luv')
local stdout
if uv.guess_handle(1) == 'tty' then
stdout = assert(uv.new_tty(1, false))
else
stdout = assert(uv.new_pipe(false))
uv.pipe_open(stdout, 1)
end
stdout:write("hello world\n")
uv.run()
stdout:shutdown()
uv.run() When redirecting output to a file, EDIT:
|
Possibly a LibUV bug when calling local uv = require('luv')
local fd = assert(uv.fs_open('test.txt', 'w', tonumber('644', 8)))
local pipe = assert(uv.new_pipe())
assert(uv.pipe_open(pipe, fd))
pipe:shutdown()
uv.run() LibUV only tests |
Was able to reproduce it with libuv: libuv/libuv#2658 |
This is a hacky band-aid fix for a bigger problem that needs a more comprehensive solution. See luvit#1094 Closes luvit#1083, does not affect luvit#1023
This is a hacky band-aid fix for a bigger problem that needs a more comprehensive solution. See luvit#1094 Closes luvit#1083, does not affect luvit#1023
This is a hacky band-aid fix for a bigger problem that needs a more comprehensive solution. See luvit#1094 Closes luvit#1083, does not affect luvit#1023
Since commit 84218f2 redirecting the output of luvit aborts. This bad commit was found using
git bisect
.Test file hello.lua:
Lua and Luvit 2.14.2 are working fine:
... whereas Luvit 2.16.0 aborts:
The text was updated successfully, but these errors were encountered: