Subject: Re: Bash, DT, and other ramblings.
To: None <stevec@accessone.com>
From: Randy Thompson <randyt@sequent.com>
List: port-mac68k
Date: 11/03/1996 11:27:47
Steven:

> I've been having problems with processes refusing to die under NetBSD.
> Even when I do a kill -KILL or enter single user mode they still stick
> around.  Has anyone experienced this?  I use the bash shell.

I am a bit new to NetBSD as I have a Quadra and only just recently have
kernels come available that will allow me to run it (Thank you ever so
much Allen!), but I feel pretty sure that the following will hold true
on NetBSD.

A SIGKILL (-KILL or -9 in all other Unix OS's I have used) doesnt
necessarily mean a sure kill. While a SIGKILL cannot be ignored by the
process itself, a process can be in a state that will keep the signal
from being recognized. When you send a signal, it is queued to the
process and can not be delivered until certain conditions are met. In
essence, if the process is running or blocked in the kernel at a priority
that is non-interruptable, the process will not die until it is released
from the kernel. If the process is never released, it will never die.

So, what exactly are these processes doing when you try and kill them?
Are you killing off a parent with a SIGKILL before you kill off its
children? If so, send a SIGHUP or SIGTERM to the parent first and see
if it will signal its children to die off. Give it a little time.

A SIGKILL should ALWAYS be your last resort.

> Also, when I use dt and I get a talk message, or someone writes to my
> terminal it messes up the display.  Would it be possible for dt to "grab"
> anything written to the tty it is started from and display it nicely on
> the screen, or for dt to run in the background and the shell dt started
> from becomes virtual console no 1?

I havent used dt on NetBSD but I gather that it is similar to screen.
If so, this is a common condition/problem. It happens on plain ttys as
well. The message is written to your screen at whatever point your cursor
is and whatever state your screen is in. Often, the returns and linefeeds
get ignored and your screen is messed up. If possible, just hit your
redraw command (^L in vi). It would be nearly impossible for dt determine
what is a "friendly" byte stream and what isnt.

> Sometimes when I type a key will "stick" and I will have to hit another
> key to stop it from printing across the screen.  I assume this is a bug
> with the adb, and it's probably been fixed by now. The kernel I'm using
> is a custom kernel from Oct 10.

Possibly a bug, possibly a keyboard problem. Test your keyboard in a
few mac applications and see what happens.

Regards,
--------------------------------------------------------------------------
|   Randy Thompson                 |   Sequent Computer Systems, Inc.    |
|   Technical Support Specialist   |   Federal Sales Operations          |
|   randyt@sequent.com             |   1430 Springhill Road, Suite 400   |
|   703-442-9100                   |   McLean, VA 22102                  |
--------------------------------------------------------------------------
| Knowledge, like virtue, carries its own rewards as well as punishments |
--------------------------------------------------------------------------