> From: [email protected] (Christian Weisgerber) > Date: Tue, 13 Jul 2010 22:28:47 +0000 (UTC) > > Theo de Raadt <[email protected]> wrote: > > > > - posix_openpt(), grantpt(), unlockpt() and ptsname(), and > > > - utmpx. > > > > > > This causes a real burden on people trying to write network login > > > services, terminal emulators, terminal multiplexers, etc. > > > > You are killing us with hyperbole. > > Well, I have been waiting for some time for porters to run against > a wall because of the lack of posix_openpt() etc, but so far it > hasn't happened yet. > > I certainly don't think it's a burden on third party developers--they'll > just shrug and ignore us. > > (app/luit in xenocara was broken until I fixed it to use openpty(); > the upstream of net/rtorrent essentially told me to shove it if we > didn't support the POSIX interface and ignored my patch, but that > was for a configure test and isn't even really used in the program.)
Despite its name, posix_openpt() isn't a mandatory, but an "X/Open System Interfaces" extension. It's SVR4 crap inherited when X/Open and POSIX were merged into the same standard. If we'd play the standards game, we'd have openpty() as a "BSD System Interfaces" in POSIX as well. Note the following gem in the "standard": The behavior of the grantpt() function is unspecified if the application has installed a signal handler to catch SIGCHLD signals That should be enough to make people avoid these interfaces like the pest they are. Cheers, P.S. I'm partly responsible for the implementation of this crap in Linux and the GNU C Library. I'm sure people got holed as a result of the complexity of my origional implementation of grantpt(). P.P.S. I'm also partly responsible for the utmpx implementation in Linux. Looking back, I think the utmp -> utmpx involves a lot of pain for no gain. Perhaps things are different now, but there were almost no applications that actually used the utpx interfaces correctly. And because many systems (including Linux) have implementation-defined extensions and restrictions, it is impossible to write truly portable applications that use utmpx.
