Re: 2.6.10-rc1-mm3

Andries Brouwer
2004-11-09T10:34:30Z

On Mon, Nov 08, 2004 at 09:27:47PM -0800, Andrew Morton wrote:

> As for the limitation of 256 legacy ptys: we should either raise it by
> cooking up new device names or limit it to 256 in config. The latter, I
> guess. Is there a requirement to support more than 256 legacy ptys?

No. glibc uses 256 of them.

To make life interesting they use names
"pqrstuvwxyzabcde"/"0123456789abcdef"
while BSD used
"pqrsPQRS"/"0123456789abcdefghijklmnopqrstuv"
and the first ENOENT terminates the search, so old BSD programs
might see only 16 ptys.

I would be inclined to remove the variable CONFIG_LEGACY_PTY_COUNT,
using 256. If one really wants to use CONFIG_LEGACY_PTYS, that is
the right number. So, in include/linux/tty.h:

- #define NR_PTYS CONFIG_LEGACY_PTY_COUNT
+ #define NR_PTYS 256

Andries