Blob
1 #define getpts not_using_this_getpts2 #include "bsdpty.c"3 #undef getpts5 #include <util.h>7 int8 getpts(int fd[], char *slave)9 {10 if(openpty(&fd[1], &fd[0], NULL, NULL, NULL) >= 0){11 fchmod(fd[1], 0620);12 strcpy(slave, ttyname(fd[0]));13 return 0;14 }15 sysfatal("no ptys");16 return 0;17 }