mirror of
git://git.musl-libc.org/musl
synced 2025-01-10 16:49:50 +00:00
fix errno for posix_openpt with no free ptys available
linux fails the open with ENOSPC, but POSIX mandates EAGAIN.
This commit is contained in:
parent
9b2921bea1
commit
4fd0f20560
@ -7,7 +7,9 @@
|
||||
|
||||
int posix_openpt(int flags)
|
||||
{
|
||||
return open("/dev/ptmx", flags);
|
||||
int r = open("/dev/ptmx", flags);
|
||||
if (r < 0 && errno == ENOSPC) errno = EAGAIN;
|
||||
return r;
|
||||
}
|
||||
|
||||
int grantpt(int fd)
|
||||
|
Loading…
Reference in New Issue
Block a user