grantpt failure
public c v1 · immutable#include <stdio.h>#include <unistd.h>#include <errno.h>#include <fcntl.h>intmain(int argc, char **argv){ int ptyfd = open("/dev/ptmx", O_RDWR); if (ptyfd < 0) { printf("could not open /dev/ptmx: %d %s\n", errno, strerror(errno)); } else if (grantpt(ptyfd) <0) { printf("could not grantpt: %d %s\n", errno, strerror(errno)); } else { printf("success\n"); }}