[comp.sys.att] Why is my 2nd ksh

canoaf@dept.csci.unt.edu (Augustine Cano) (07/23/90)

Sys ownership of ksh was discussed some months ago.  Of course, never having
had that problem then, I didn't save the articles.  One day, for no apparent
reason, only one ksh showed up being owned by sys as a result of a ps -e
command.  After logging out and logging back in, the first "Full screen Unix"
ksh is owned, as always, by w?.  The second is always owned by sys and all
the succeeding ones by w?, as it should be.  This happens every time, I now
always have a sys owned ksh.  If I close the sys ksh window, the next one I
open will be owned by sys.

What is causing this?  Can those who have seen this before provide some
assistance?  BTW, this is happening on a 3b1 2/75 3.51m.

Thanks in advance.

Augustine Cano		afc@shibaya.lonestar.org
				canoaf@dept.csci.unt.edu

gil@limbic.UUCP (Gil Kloepfer Jr.) (07/25/90)

In article <1990Jul22.193512.14903@dept.csci.unt.edu> afc@shibaya.lonestar.org (Augustine Cano) writes:
>command.  After logging out and logging back in, the first "Full screen Unix"
>ksh is owned, as always, by w?.  The second is always owned by sys and all
>the succeeding ones by w?, as it should be.  This happens every time, I now
>always have a sys owned ksh.  If I close the sys ksh window, the next one I
>open will be owned by sys.
>
>What is causing this?  Can those who have seen this before provide some
>assistance?  BTW, this is happening on a 3b1 2/75 3.51m.

The problem is with the links between /dev/syscon, systty, and window.
They should be, as follows:

   0 crw-rw-rw-  3 root    sys       7,  0 Jan  1  1970 syscon
   0 crw-rw-rw-  3 root    sys       7,  0 Jan  1  1970 systty
   0 crw-rw-rw-  3 root    sys       7,  0 Jan  1  1970 window

Your major number may vary, but the important thing is that it's the same
one as the window driver.  You can find this out with masterupd -l

The best way to accomplish this is to modify /etc/rc to delete syscon and
systty, and create links for both of them to /dev/window upon bootup.

The reason they get unlinked in the first place is because of a "feature"
of this unix, which tries to make the controlling terminal at the time
the system is brought to run-level "s" the "single user terminal."  Note
that "S" doesn't stand for "shutdown" -- it stands for single-user.
I may be wrong (and someone will definitely correct me if I am ;-),
but this is one of the few unices (if not the ONLY one) that use
single-user mode this way.  Sigh...

For more information, see /etc/profile and look at the junk to implement
shutdown in run-level "s".

Gil.
-- 
Gil Kloepfer, Jr.  ...!ames!limbic!gil  |  gil%limbic@ames.arc.nasa.gov
ICUS Western Development Center     Houston, Texas