Skip to contentSkip to conversation

grantpt and ptsname man pages

DISCUSSION Serge E. Hallyn 2 participants 2 messages Sep 30, 2011 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

Hi,

near as i can tell (from tests and code), ptsname and grantpt both require the passed-in fd to exist in /dev/pts. So if you pass in an fd from a newinstance devpts mounted elsewhere things can go wrong. Particularly if the passed-in fd is for /other/dev/pts/0 and /dev/pts/0 does not exist, then grantpt and ptsname will return -ENOENT.

The manpage should probably mention that. I've not written anything for it yet. (Willing to, but not until this weekend I'm afraid.)

thanks,
-serge
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#1 lore raw

Hi Serge,

Quoted 11 lines · Serge E. Hallyn

Hi,

near as i can tell (from tests and code), ptsname and grantpt both require the passed-in fd to exist in /dev/pts.  So if you pass in an fd from a newinstance devpts mounted elsewhere things can go wrong.  Particularly if the passed-in fd is for /other/dev/pts/0 and /dev/pts/0 does not exist, then grantpt and ptsname will return -ENOENT.

The manpage should probably mention that.  I've not written anything for it yet.  (Willing to, but not until this weekend I'm afraid.)

That'd be great!

Thanks,

Michael

Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html