Maybe it will run on SunOS 5.8 now.
This commit is contained in:
parent
dd4afdf4eb
commit
dc305d0368
2 changed files with 20 additions and 1 deletions
|
|
@ -9,8 +9,14 @@
|
|||
int
|
||||
getpts(int fd[], char *slave)
|
||||
{
|
||||
void (*f)(int);
|
||||
int r;
|
||||
|
||||
fd[1] = open("/dev/ptmx", ORDWR);
|
||||
if ((grantpt(fd[1]) < 0) || (unlockpt(fd[1]) < 0))
|
||||
f = signal(SIGCLD, SIG_DFL);
|
||||
r = grantpt(fd[1]);
|
||||
signal(SIGCLD, f);
|
||||
if(r < 0 || unlockpt(fd[1]) < 0)
|
||||
return -1;
|
||||
fchmod(fd[1], 0622);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue