Blob


1 #define getpts not_using_this_getpts
2 #include "bsdpty.c"
3 #undef getpts
5 int
6 getpts(int fd[], char *slave)
7 {
8 if(openpty(&fd[1], &fd[0], NULL, NULL, NULL) >= 0){
9 fchmod(fd[1], 0620);
10 strcpy(slave, ttyname(fd[0]));
11 return 0;
12 }
13 sysfatal("no ptys");
14 return 0;
15 }