Package: manpages
Version: 2.17-1
Severity: minor

openpty(3) and pty(7) are unclear about whether or not openpty(3) will return a 
unix98 PTY.

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.

At least the FILES section of openpty(3) needs to be corrected.  pty(7) and
openpty(3) could also mention the fact mentioned above.
-- 
Thomas Hood


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to