Found because 'stress-ng --pty 1' reports "open /dev/ptmx failed, errno=0":

$ uname -r # also with 3.5.7-1 and 3.6.0-1.x86_64
3.7.0-0.19.g6c5537c0298e.x86_64

$ cat manyptmx.c
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>

int main()
{
  int fd;
  errno = __ELASTERROR;
  do {
    fd = open("/dev/ptmx", O_RDWR);
    printf("%d, %d\n", fd, errno);
  } while (fd >= 0);
  return 0;
}

$ gcc -o manyptmx manyptmx.c

$ ./manyptmx
3, 2000
4, 2000
...
127, 2000
128, 2000
      0 [main] manyptmx 204 tty_list::allocate: No pty allocated
                                                      -1, 2000

--
Regards,
Christian


--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to