Re: something funny about tty's on 2.6.4-rc1-mm1

From: H. Peter Anvin
Date: Tue Mar 02 2004 - 19:05:08 EST


Edgar Toernig wrote:

IMHO more important: what about utmp? It would become terribly
large. Beside that, such huge numbers won't fit into ut_id.

Ciao, ET.

--[man utmp extract]--
...
char ut_id[4]; /* init id or abbrev. ttyname */
...
xterm(1) and other terminal emulators directly create a
USER_PROCESS record and generate the ut_id by using the
last two letters of /dev/ttyp%c or by using p%d for
/dev/pts/%d. If they find a DEAD_PROCESS for this id,
they recycle it, otherwise they create a new entry.
...

That's broken for anything more than 1000 ptys, OR if you're using BSD and Unix98 ptys at the same time.

In other words, it's totally broken.

-hpa
-
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/