lkml.org 
[lkml]   [2004]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: something funny about tty's on 2.6.4-rc1-mm1
Albert Cahalan wrote:
>
> > As RBJ said, ptys are now recycled in pid-like fashion,
> > which means numbers won't be reused until wraparound
> > happens. This is good for security/fault tolerance,
> > at least to some minor degree.
>
> Ouch. It's bad for display and bad for typing.
> What is easier to type?
>
> ps -t pts/6
> ps -t pts/1014962

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

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.274 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site