[comp.unix.admin] SCSI thanks, wild user processes

harrison@csl.dl.nec.com (Mark Harrison) (05/31/91)

First, thanks to everyone who responded to my questions about
unhooking SCSI devices while the machine was still running.
I  guess I won't be trying that anytime soon. :-)

Another question:  We recently had a system crash due to
a user running a shell script that accidentally invoked
itself.

$ cat foo
cd /somewhere-else #directory did not exist.
./foo

Is there

1.  A way to keep this from crashing the system?
2.  If the system has crashed, to determine that
    this was the reason?

We are running SunOS 4.1.1.

Thanks in advance,
Mark.
-- 
Mark Harrison           | Note: harrison@ssd.dl.nec.com and
harrison@csl.dl.nec.com | necssd!harrison are not operating at
(214)518-5050           | present.  Please forward mail through the
                        | above address.  Sorry for the inconvenience.

mills@ccu.umanitoba.ca (Gary Mills) (05/31/91)

In <1991May30.210639.17442@csl.dl.nec.com> harrison@csl.dl.nec.com (Mark Harrison) writes:

>Another question:  We recently had a system crash due to
>a user running a shell script that accidentally invoked
>itself.

>Is there

>1.  A way to keep this from crashing the system?

You could do something like this, which we invoke from /etc/rc.local

#!/bin/sh
#kpatch: apply local patches to the running kernel
#	set max per-user processes to 200

N=/vmunix
D=/dev/mem

adb -w -k $N $D <<\EOF
maxuprc/W 0t200
$q
EOF

#!/end

>2.  If the system has crashed, to determine that
>    this was the reason?

If you have a dump, looking at the process table with ``ps'' should
show hundreds of copies of the shell script running.

>We are running SunOS 4.1.1.

-- 
-Gary Mills-         -Networking Group-          -U of M Computer Services-