Disable support for /dev/ptmx in FreeBSD 7.0. While it's a good idea in
principle, the current devfs-based cloning facilit makes the current user<->kernel protocol for allocating new pts nodes difficult or impossible to do without leading to resource leaks or race conditions. We tentatively plan to reintroduce ptmx/pts support in FreeBSD 7.1 once a fixed version has settled out in HEAD. People who really want to run with the current code can re-enable it but it will require tweaking conf files and unifdef'ing it. By removing it now before the release, we avoid having to support the current allocation protocol in future releases in order to provide backwards compatibility with older libc's. Discussed with: cognet, erwin Approved by: re (kensmith)
This commit is contained in:
parent
627cd6f524
commit
063d86b166
@ -91,6 +91,7 @@ is_pts(int fd)
|
||||
return (_ioctl(fd, TIOCGPTN, &nb) == 0);
|
||||
}
|
||||
|
||||
#if 0
|
||||
int
|
||||
__use_pts(void)
|
||||
{
|
||||
@ -109,6 +110,7 @@ __use_pts(void)
|
||||
}
|
||||
return (use_pts);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* grantpt(): grant ownership of a slave pseudo-terminal device to the
|
||||
@ -212,10 +214,12 @@ posix_openpt(int oflag)
|
||||
if (oflag & ~(O_RDWR | O_NOCTTY))
|
||||
errno = EINVAL;
|
||||
else {
|
||||
#if 0
|
||||
if (__use_pts()) {
|
||||
fildes = _open(_PATH_DEV PTMX, oflag);
|
||||
return (fildes);
|
||||
}
|
||||
#endif
|
||||
mc1 = master + strlen(_PATH_DEV PTM_PREFIX);
|
||||
mc2 = mc1 + 1;
|
||||
|
||||
|
@ -49,6 +49,7 @@ static char sccsid[] = "@(#)pty.c 8.3 (Berkeley) 5/16/94";
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if 0
|
||||
int __use_pts(void);
|
||||
|
||||
static int
|
||||
@ -90,6 +91,7 @@ new_openpty(int *amaster, int *aslave, char *name, struct termios *termp,
|
||||
|
||||
return (0);
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
openpty(int *amaster, int *aslave, char *name, struct termios *termp, struct winsize *winp)
|
||||
@ -99,8 +101,10 @@ openpty(int *amaster, int *aslave, char *name, struct termios *termp, struct win
|
||||
int master, slave, ttygid;
|
||||
struct group *gr;
|
||||
|
||||
#if 0
|
||||
if (__use_pts())
|
||||
return (new_openpty(amaster, aslave, name, termp, winp));
|
||||
#endif
|
||||
|
||||
if ((gr = getgrnam("tty")) != NULL)
|
||||
ttygid = gr->gr_gid;
|
||||
|
@ -1519,7 +1519,7 @@ kern/tty.c standard
|
||||
kern/tty_compat.c optional compat_43tty
|
||||
kern/tty_conf.c standard
|
||||
kern/tty_cons.c standard
|
||||
kern/tty_pts.c optional pty
|
||||
#kern/tty_pts.c optional pty
|
||||
kern/tty_pty.c optional pty
|
||||
kern/tty_subr.c standard
|
||||
kern/tty_tty.c standard
|
||||
|
Loading…
x
Reference in New Issue
Block a user