epoll_create: fail with EINVAL if size is non-positive

This is a part of the interface contract defined in the Linux man
page (official for a Linux-specific interface) and asserted by test
cases in the Linux Test Project (LTP).
This commit is contained in:
Kristina Martsenko authored and Rich Felker committed 2022-08-24 20:35:47 -04:00
1 parent 2e5fff43dd
commit d4f987e4ac
1 file changed
+1
+1
View File
@@ -5,6 +5,7 @@
int epoll_create(int size)
{
if (size<=0) return __syscall_ret(-EINVAL);
return epoll_create1(0);
}