[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MiNT bug
On Fri, Mar 27, 1998 at 07:29:52PM -0500, Martin-Eric Racine wrote:
> >On Fri, 27 Mar 1998, Martin-Eric Racine wrote:
> >>I was just writing this simple script, and it seems MiNT
> >>(or the shell?) doesn't understand the $TTY variable:
> >
> >tty in our case is a program that will fetch the current tty,
>
>Sounds nice, except it doesn't excuse MiNT not supporting $TTY which
>is a standard Unix environment variable.
Oh, really?? Maybe under BSD... But it's not defined in Solaris, and
therefore apparently not a required part of SVR4 *or* POSIX. Besides, it
may be defined in /etc/profile; it probably *isn't* intrinsically defined
by the shell, or by /bin/login (pretty much the parent process of all
user processes).
And about K. Ellis's comments about daemons: Daemons, by definition, are
supposed to run without being attached to any terminal. Every process
inherits a session (as well as an environment) from its parent, and the
session ID, or SID, is the same for all children. Part of the session is
the "controlling tty". A daemon must execute the setsid() call to get a
new session for itself, and in the process the link to a controlling tty
is severed. This is all documented very well in "Advanced Programming in
the UNIX Environment" by Richard Stevens.
This is why, when you do a 'ps', you will see that all the daemons
have "?" in the "TTY" column.
Note: My comments are all about real UNIX; I know very little as of
yet about how MiNT implements UNIX functionality.
--
--Michael
-------------------------------------------------------------------------------
Michael Hill <>< Isaiah 9:6 | "We are all pilgrims on the same journey--but
Michael_Hill@csgsystems.com | some pilgrims have better road maps."
Aerospace/Software Engineer | --Nelson DeMille, "The Talbot Odyssey"
CSG Systems, Inc. |
http://www.qadas.com/~msh |
---In a marketplace (like the one of ideas), not everything has equal value!---
Did you ever notice that everybody in favor of abortion has already been born?!