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

cqueue constructor that returns errno #173

Closed
daurnimator opened this issue Nov 16, 2016 · 0 comments · Fixed by #229
Closed

cqueue constructor that returns errno #173

daurnimator opened this issue Nov 16, 2016 · 0 comments · Fixed by #229

Comments

@daurnimator
Copy link
Collaborator

I currently have some code that does this:

	local cq do -- Allocate cqueue first up, as it can throw when out of files
		local ok, err = pcall(cqueues.new)
		if not ok then
			local errno = ce.EMFILE
			return nil, ce.strerror(errno), errno
		end
		cq = err
	end

==> I have to guess that the error was due to running out of file descriptors, but this is not always correct.

It would be nice if there was a (alternate?) cqueue constructor that would return the actual errno.

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

Successfully merging a pull request may close this issue.

1 participant