> From: Clem Cole <clemc(a)ccc.com>
> another old V6 trick is the use file redirection from the different
> terminal to unlock a hosed tty.
'stty {mumble} > /dev/ttyX', in case that wasn't clear.
Note that this only works if you have a working shell on _another_ terminal,
so if you're e.g. working with an emulation which has only one working
terminal, and your raw-mode program on it has gone berserk, 'See Figure 1'.
It really is advised to have another working terminal if you want to play
with raw-mode programs.
Noel
I got a diff for adding actual backspace and delete to v7, linked off of
gunkies... Anyhow, I can manually edit the referenced files and rebuild,
but I would rather do it canonically. I don't see patch anywhere, so did
v7 users use diffs to patch source and if so what's the magic?
Thanks,
Will
--
GPG Fingerprint: 68F4 B3BD 1730 555A 4462 7D45 3EAA 5B6D A982 BAAF
Echoing other answers, I regularly use groff in Cygwin.
If you're into Unix/Linux, Cygwin is a great tool with a
remarkably clean installation process. I use default
PostScript output by choice, because I can tinker with
PostScript but not with PDF. ps2pdf (available from
Cygwin) has always worked when I need PDF.
I must admit, tough, that this approach will be pretty
onerous if you do not want Cygwin for any other
reason. And I should add that PoscScript requires a
special viewer; I use gsview.
Doug
As y'all know, I'm a relative latecomer to the world of Unix, but I do
try to figure out how y'all did it back when. So, sometimes, as in this
case, I can figure out how to do something, but I'm curious how it was
done back in the day, moreso than how I can get it done today. I'm
looking at the patching of my shiny new 2.11 BSD pl 431 system running
on my speedy little virtual PDP-11/70, so I grabbed patch 432 (here's a
portion of the patch):
...
To install the update cut where indicated below and save to a file
(/tmp/432) and then:
cd /tmp
sh 432
./432.sh
./432.rm
sh 432.shar
patch -p0 < 432.patch
Watch carefully for any rejected parts of the patch. Failure of a
patch typically means the system was not current on all preceeding
updates _or_ that local modifications have been made.
...
====== cut here
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create:
# 432.rm
# 432.sh
# 432.shar
# 432.patch
...
# End of shell archive
This seems straightforward. Just follow the directions et voila magic
happens.
My questions for y'all are how would you go about doing this? Use vi to
delete everything through the ==== cut here line? Use some combination
of standard unix tools to chop it up? What was your workflow for
patching up the system using these files?
In my world, if I screw something up, it's 15 seconds to run a restore
script in my simh directory and I can try again, so my level of concern
for a mistake is pretty low. If I was doing this in 1980, on real
hardware, I would have had many concerns, as I'm sure some of y'all can
remember, how did you prepare and protect yourselves so a patch was
successful.
BTW, I thought .shar was an archive format, so when I saw the patch was
a shar file, I was worried it would be in some binary form, lo and
behold, it looks like text to me... not even b64. So much to learn, so
little time.
Thanks,
Will
--
GPG Fingerprint: 68F4 B3BD 1730 555A 4462 7D45 3EAA 5B6D A982 BAAF
> From: Larry McVoy
> Yeah, write is unbuffered though I think Noel is correct, it's going to
> a tty and the tty will buffer until \n
The 'wait until newline' is on the input side.
Output is buffered (in the sense that characters are held in the kernel until
the output device can take them); but normally output will start to happen as
soon as the device is able to take them. Only a certain amount can be
buffered though, after that (the 'high water', I think it's called), the
process is blocked if it tries to do output, and awakened when the buffered
output level goes past the 'low water' mark.
Note that getchar() and putchar() are subroutines in a library; looking
at the source:
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V6/usr/source/s4/getchr.s
you can see how they relate to the actual read/write calls to the OS.
> So you probably have to set the tty in raw mode
Probably best to run such programs from something other than the main console,
because if there's a bug in the program, and the terminal is in raw mode, if
you're on the console, you may have to reboot the system to regain control of
the system. (Interrupt characters, ^D etc won't work.)
> (sorry that I'm vague, I never ran V6).
Tnat's OK, I pretty much have the V6 kernel memorized, from working with
it back in the day... :-)
Noel
I am using C in V6 to create a Forth compiler. I don;t have any interest in
Forth as a general purpose language, however I do like it. It's satisfying
to create a language from the ground up. I'm interested in it a simple and
extensible interpreted language for toying with my PDP-11s, so I'll have
some with it in the future.
I have a very basic problem. I am simply using getchar and putchar for
console IO, which is convenient indeed. I'm struggling however with how C
processes the IO. It seems that when I type at the console, my typing is
immediately echoed to my terminal window. When I press backspace the system
responds with the character that was deleted, which is fine, as I assume it
was from the paper teletype days. However, my code is receiving input and
also echoing the output, but nothing appears on the terminal until I press
enter, when the system displays the whole line of input, which is
essentially a duplicate of what the terminal originally displayed, but with
the consolidated edits. My code is reading and echoing the input character
by character.
Here's my question. How can I suppress the original C/Unix echo, and get my
output to appear immediately? This simple sample code form the C
programming manual behaves the same.
int main() {
int c;
while ((c = getchar()) != EOF) {
putchar(c);
}
}
Paul
*Paul Riley*
Mo: +86 186 8227 8332
Email: paul(a)rileyriot.com
I'm hearing that 50% of what's left of AT&T research got the axe today.
I'm hoping to hear from friends about details.
God's gift to google, as we have said in the past.
Henry Bent:
Are there any former Bell Labs sysadmins on this list? My father was the
sysadmin for hoh* (Crawford Hill, mostly the radio astronomy folks) in the
mid-late '80s and early '90s and I would be especially interested to hear
from hou* (Holmdel, what a building!) folks but also ihn* (Indian Hill) and
the like. I'm very curious about what life was like on the ground, so to
speak.
=====
It is worth pointing out that, like many universities, Bell
Labs had at least two layers of computing and therefore of
sysadmins. There were official central Comp Centers, which
is the world Henry asks specifically about; but there were
also less-central computing facilities at the divisional and
center and department level.
I never worked for a comp center, but my role in 1127 was
basically that of sysadmin for our center's own systems;
the ones used both for our day-to-day computing (including
that known to the uucp world as research!) and for OS and
other experiments and research and hacking.
There were also two large VAXes called alice and rabbit,
which afforded general-use computing for other departments
in Division 112. Us 1127 sysadmins (I wasn't the only one
by any means) ran those too; I don't know the full history
but I gather that happened because there was some desire
to run the Research version of UNIX rather than the comp-center
one for that purpose.
One system I had hands in straddled the researcher/comp-center
boundary: 3k, the Cray X-MP/24 bought specifically for
researchers. It was physically located in the comp center,
but managed jointly: it ran Cray's UNICOS but with
substantial additions from the Research world, including
the stream I/O system (which is rather self-contained so
it was not too hard to graft into a different UNIX) and
Datakit support (using a custom interface board designed
and built by Alan Kaplan and debugged by me and Alan
over several late-night sessions. (I remember that
the string "feefoefum\n", which is an obscure cultural
reference from one of my previous workplaces, was
particularly effective at shaking out bugs!)
Once UNICOS-a-la-Research was running stably, staff from
the Murray Hill Comp Center looked after day-to-day
operations, with Research involved more for software
support as needed.
Norman Wilson
Toronto ON
Are there any former Bell Labs sysadmins on this list? My father was the
sysadmin for hoh* (Crawford Hill, mostly the radio astronomy folks) in the
mid-late '80s and early '90s and I would be especially interested to hear
from hou* (Holmdel, what a building!) folks but also ihn* (Indian Hill) and
the like. I'm very curious about what life was like on the ground, so to
speak.
I'll start off with a quick anecdote. When I started college I began
working for the computing center doing menial jobs. There was an older,
ex-army guy leading the networking department who extolled the virtues of
the VAX up and down; I think Oberlin would have kept the VAX 6620 running
VMS 5.5 forever if he had his way. Anyway, I mentioned his position to my
father and he told me that the best thing he ever did was replace the VAX
systems (and the endless mounting/remounting of RL02s for user data) with
early generation Sun 4 systems.
-Henry
Coming upon this dedication in W.B. Yeats's book, "Irish Folk
stories and Fairy Tales", I felt a frisson of connection: "Inscribed
to my mystical friend, G. R." Mystically present in the Unix room
and on the 1127 org chart, G. R. Emlin took a place in our little
community akin to that of fairies in Irish peasant culture. First
encountered by Fred Grampp, G. R. manifested to others in various
guises, ranging from Grace Emlin, whom I remember as a security guru,
to a Labs-badged apparition now housed in the corporate archives
(www.peteradamsphoto.com/unix-folklore/) My most memorable personal
encounter was when I received from G. R. a receipt for paint for the
water-tower project (spinrooot.com/pico/pjw.html) as part of a request
for reimbursement. I passed the voucher up the chain of command to
our executive director, Vic Vyssotsky. Unfortunately for G. R., Vic,
despite his masterful ability to bypass bureaucratic obstacles,
declared he wasn't authorized to approve plant improvements.
Doug