multiple devpts mounts not supported in sysdeps/unix/sysv/linux/ptsname.c:_ptsname_internal()
Andreas Schwab
schwab@linux-m68k.org
Tue Oct 11 20:52:00 GMT 2011
"Serge E. Hallyn" <serge.hallyn@canonical.com> writes:
> grantpt, ptsname, and ptsname_r make use of _ptsname_internal(). That
> function works by appending the TIOCGPTN result to "/dev/pts". The
> path /dev/pts is hardcoded. That means that if you call grantpt on an
> fd from /chroot/dev/pts, and /dev/pts/0 (for instance) does not exist
> on the host, you'll (wrongly) get back an error. This has been seen with
> libvirt (and is easly to verify with a simple testcase).
If you want to use /dev/pts from the chroot you must run grantpt in the
chroot. Since getpt or posix_openpt always returns an fd from the
system /dev/pts this is not an unreasonable restriction.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Libc-alpha
mailing list