Re: [PATCH] char/tty_io: fix legacy pty name when more than 256 ptydevices are requested

From: H. Peter Anvin
Date: Thu Sep 10 2009 - 12:03:37 EST


On 09/10/2009 07:07 AM, Alan Cox wrote:
> I actually have another proposal having reviewed the user space code.
>
> Limit the BSD ptys to 256. Nothing uses them, the C library routines for
> their allocation would need glibc modifying (which takes about five years
> for a tty change it seems anyway). It's basically a huge amount of work
> for no purpose at all.
>
> So lets limit BSD ptys (unused anyway) to 256 and be done with it.

IMO this is the right thing to do (and in fact what the current kernel
does, explicitly, via Kconfig); I guess I assumed Mauro had a specific
reason for breaking it, but there are multiple reasons to NOT do this:

a) the userspace code needs to be changed regardless, in an arbitrary
number of places.
b) noone uses them, except the occasional dedicated pipe which wants
a predefined name.
c) the memory used is statically allocated.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/