[comp.sys.apollo] What is exactely /dev/console?

wjw@eba.eb.ele.tue.nl (Willem Jan Withagen) (02/04/91)

In article <1991Feb1.193832.8060@alchemy.chem.utoronto.ca> you write:
>I have just found that the /dev directory has been somewhat mangled
>after installing SR10.3.p. The install effectively does a 'mkdev /dev
>all' which should rebuild the standard devices; however, it deletes
>the existing devices, as it should, but then doesn't make new ones for:
>
A general question on the /dev/console device.
	When I was rebuilding 'pcnfsd' it got bitten by the fact that it
	could not open /dev/console for writting. (Probably you can write
	/dev/console on a sun. and is it the display)
	So I patched the code to write to a user configurable file.

The reason now for the question is: All /etc/rc.* files dump code to
	/dev/console upon boot. So it is writable!
	But when, how and by whom?

Thanx,
	Willem Jan Withagen.

Eindhoven University of Technology   DomainName:  wjw@eb.ele.tue.nl    
Digital Systems Group, Room EH 10.10 
P.O. 513                             Tel: +31-40-473401
5600 MB Eindhoven                    The Netherlands

krowitz@RICHTER.MIT.EDU (David Krowitz) (02/04/91)

From the comments at the top of the /etc/rc shell script:

#
# echo commands are parenthesized so that they will be run
# in a subprocess (echo is builtin to the shell).  Otherwise,
# the shell running this script (and all the programs started
# from it) would acquire /dev/console as their controlling tty.
#                        


If I remember correctly, the Apollo display manager is started by /etc/init
*after* "init" finishes executing the /etc/rc shell script (which, in turn,
runs /etc/rc.local and /etc/rc.user) when "init" reads the /etc/ttys files
and initializes the /dev/tty?? and /dev/console devices. I suspect that
either the DM or the XApollo server has /dev/console locked, depending on
whichever one owns the "root" display.


 -- David Krowitz

krowitz@richter.mit.edu   (18.83.0.109)
krowitz%richter.mit.edu@eddie.mit.edu
krowitz%richter.mit.edu@mitvma.bitnet
(in order of decreasing preference)

dente@els.ee.man.ac.uk (Colin Dente) (02/05/91)

In article <4f9a812d.1bc5b@pisa.ifs.umich.edu> rees@citi.umich.edu (Jim Rees) writes:
[...]
>here, good for lots of laughs, that writes to the real console and simulates
>a crash, complete with crash_status 220009 (look it up).

I just did... does anyone know what this code was supposed to mean, and why
the OS/Magtape manager? - If you've got a tape that won't fit through a
25" hatch, then I really don't want to hear about it!!

Bemusedly yours,

Colin


--
  Colin Dente                     | JANET: dente@uk.ac.man.ee.els
  Manchester Computing Centre     | ARPA:  dente@els.ee.man.ac.uk 
  University of Manchester, UK    | UUCP:  ...!mcsun!ukc!manchester!dente 
                 ... I am the one you warned me of ...

rees@pisa.ifs.umich.edu (Jim Rees) (02/05/91)

In article <1080@eba.eb.ele.tue.nl>, wjw@ebs.eb.ele.tue.nl (Willem Jan Withagen) writes:

  Writting to /dev/console will get you a file in /usr/adm 
  (\`node_data/system_logs) at which you'll be able to take a look. 
  I never realised that until now. 

You could also RTFM.  'apropos console' points you at both console(4) and
mkcon(8), which discuss system_logs/console.  I haven't tried mkcon but it's
an intriguing concept.

rees@pisa.ifs.umich.edu (Jim Rees) (02/06/91)

In article <2093@m1.cs.man.ac.uk>, dente@els.ee.man.ac.uk (Colin Dente) writes:

  >a crash, complete with crash_status 220009 (look it up).

  I just did... does anyone know what this code was supposed to mean, and why
  the OS/Magtape manager? - If you've got a tape that won't fit through a
  25" hatch, then I really don't want to hear about it!!

According to legend, there was once a defense contractor bidding on some
computer equipment to be installed in a submarine.  On a submarine, all
equipment has to go in or out through a hatch that's 25 inches (about 60 cm)
in diameter.  If it can't fit, then they have to get out a cutting torch and
make a hole in the deck.

This contractor is supposed to have submitted a bid that was just fine
except that the tape drive wouldn't fit through the hatch.  The more
apochryphal version of this story has the contract actually awarded and
equipment delivered before the mistake is discovered.

I hope this little gem doesn't go the way of the "You must be from PR1ME"
boot shell error message and the more(1) author credit.

I once worked for a company (not Apollo) where we were instructed to find
another name for the garbage collector.  They didn't like the implication
that their programs were full of garbage!