Skip to content
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

ENOMEM on uv_spawn on Windows with env set #386

Closed
SinisterRectus opened this issue Oct 2, 2019 · 3 comments
Closed

ENOMEM on uv_spawn on Windows with env set #386

SinisterRectus opened this issue Oct 2, 2019 · 3 comments
Labels

Comments

@SinisterRectus
Copy link
Member

Code:

local uv = require('uv')

local command = 'cmd.exe'
local options = {
	env = {},
}

local handle, pid = uv.spawn(command, options, function(...)
	print('exit:', ...)
end)

print('spawn:', handle, pid)

Output:

spawn:  nil     ENOMEM: not enough memory

Removing the env field from the options table does not produce the issue. Tested with luv 1.27.0 via luvi 2.9.3 on Windows 10 Home 1903. Cannot reproduce on ubuntu 16.04 using an equivalent command. All 64-bit.

I don't know if this issue is in luv or in libuv or if it's fixed in a newer version. I ran into it while trying to build luvit on Windows and test-process and test-process-exec failed.

@squeek502
Copy link
Member

squeek502 commented Oct 2, 2019

Related: this comment and the comments after it

This test case should help a lot in getting to the bottom of it.

@squeek502 squeek502 added the bug label Oct 2, 2019
@squeek502
Copy link
Member

This is a Libuv bug that was fixed in 1.31.0:

* win: fix uv_spawn() ENOMEM on empty env (Ben Noordhuis)

@SinisterRectus
Copy link
Member Author

Good stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants