tags 348337 fixed-upstream
thanks
Hello Thomas,
> openpty(3) and pty(7) are unclear about whether or not openpty(3) will
> return a unix98 PTY.
True.
> The openpty(3) man page suggests that it will only return a legacy BSD
> PTY, and the pty(7)
> only says that posix_openpt(3) will return a unix98 PTY.
>
> A little test program:
>
> > #include <stdio.h>
> > #include <unistd.h>
> > #include <pty.h>
> > #include <utmp.h>
> >
> > int *amaster;
> > int *aslave;
> > char name[1024];
> >
> > main()
> > {
> > openpty(amaster,aslave,name,0,0);
> > }
>
> when strace'd shows this:
>
> > open("/dev/ptmx", O_RDWR) = 3
> > statfs("/dev/pts", {f_type="EXT2_SUPER_MAGIC", f_bsize=4096,
> f_blocks=2520713, f_bfree=406122, f_bavail=278075, f_files=1281696,
f_ffree=941147,
> f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
>
> So I conclude that openpty() will indeed return a unix98 PTY.
Yes, looking at the glibc source you are right. The change
appears to have occurred in 2.0.92.
> At least the FILES section of openpty(3) needs to be corrected. pty(7)
> and openpty(3) could also mention the fact mentioned above.
My solution (in man-pages-2.22) is the following:
1. I've removed the FILES section from openpty.3.
2. I've added a note to openpty.3 stating that in 2.0.92,
glibc openpty() swapped from using BSD ptys to Unix 98 ptys.
Thanks for your report.
Cheers,
Michael
--
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7
Want to help with man page maintenance?
Grab the latest tarball at
ftp://ftp.win.tue.nl/pub/linux-local/manpages/,
read the HOWTOHELP file and grep the source
files for 'FIXME'.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]