Fix pty setup code on AIX
This commit was SVN r24363.
Этот коммит содержится в:
родитель
f0f1d4e311
Коммит
a31025bb48
@ -171,7 +171,11 @@ static int ptym_open(char *pts_name)
|
||||
#ifdef HAVE_PTSNAME
|
||||
char *ptr;
|
||||
|
||||
#ifdef _AIX
|
||||
strcpy(pts_name, "/dev/ptc");
|
||||
#else
|
||||
strcpy(pts_name, "/dev/ptmx");
|
||||
#endif
|
||||
fdm = open(pts_name, O_RDWR);
|
||||
if (fdm < 0) {
|
||||
return -1;
|
||||
@ -228,6 +232,7 @@ static int ptys_open(int fdm, char *pts_name)
|
||||
close(fdm);
|
||||
return -5;
|
||||
}
|
||||
#ifdef __sun
|
||||
if (ioctl(fds, I_PUSH, "ptem") < 0) {
|
||||
close(fdm);
|
||||
close(fds);
|
||||
@ -238,6 +243,7 @@ static int ptys_open(int fdm, char *pts_name)
|
||||
close(fds);
|
||||
return -7;
|
||||
}
|
||||
#endif
|
||||
|
||||
return fds;
|
||||
#else
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user