/dev/tty implemented as /dev/fd/3

Kristoffer Eriksson ske at pkmab.se
Tue Oct 30 20:12:25 AEST 1990


Submitted-by: ske at pkmab.se (Kristoffer Eriksson)

[ I don't quite understand why the submittor wants to split this from the
thread of Re: File system name space, but let's give it a try and see what
happens, eh?  -mod ]

In article <14103 at cs.utexas.edu> arnold at audiofax.com writes:
>In general, unless someone went to the trouble, fd 3 will be attached to the
>terminal, so opening /dev/tty is pretty safe.  Nothing's foolproof; [...]
>You're no worse off than before when /dev/tty was built into the kernel.

If you have a program that closes only fd 3, this implementation will behave
differently from the old /dev/tty device implementation, won't it? You will
not be able to reach the controlling terminal by a guaranteed route, in spite
of the fact that it is still available on other fd-s. Or is the controlling
terminal concept implemented in such a way that closing fd 3 is the same as
disassociating from the controlling terminal (so you won't be bother with
terminal interrupts and such) ?
-- 
Kristoffer Eriksson, Peridot Konsult AB, Hagagatan 6, S-703 40 Oerebro, Sweden
Phone: +46 19-13 03 60  !  e-mail: ske at pkmab.se
Fax:   +46 19-11 51 03  !  or ...!{uunet,mcsun}!sunic.sunet.se!kullmar!pkmab!ske

Volume-Number: Volume 22, Number 13



More information about the Comp.std.unix mailing list