Messages in this thread | | | From | (Eric W. Biederman) | Date | Mon, 21 Dec 2015 16:03:42 -0600 | Subject | Re: [PATCH] devpts: Sensible /dev/ptmx & force newinstance |
| |
ebiederm@xmission.com (Eric W. Biederman) writes:
> "H. Peter Anvin" <hpa@zytor.com> writes: > >> Does it matter if it mounts devpts twice? It seems like a waste of a >> minuscule amount of memory, and nothing else.
> It breaks system("mknod /tmp/ptmx c 5 2"); open("/tmp/ptmx");
Correction.
It does break the above but that isn't the real reason we need to support that. We only have evidence of pople doing: "mkdir -p dev/pts; mknod c dev/ptmx 5 2; mount -t devpts dev/pts/" Where the relatives paths would work.
What actually breaks is "echo NNN > /proc/sys/kernel/pty/reserve" Which allows the primary instance of devpts to have access to more ptys than any other instance.
Ultimately if we are going to be backwards compatible we need to preserve as much of the current behavior as possible so we don't forget something in the analysis and break something we don't intend to break by accident.
Eric
| |