Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site uvm-cs.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!zehntel!dual!amdcad!decwrl!decvax!dartvax!uvm-gen!uvm-cs!hartley From: hartley@uvm-cs.UUCP (Stephen J. Hartley) Newsgroups: net.unix-wizards Subject: 4.2 kill init question Message-ID: <346@uvm-cs.UUCP> Date: Wed, 30-Jan-85 18:31:08 EST Article-I.D.: uvm-cs.346 Posted: Wed Jan 30 18:31:08 1985 Date-Received: Sat, 2-Feb-85 14:39:35 EST Organization: University of Vermont Lines: 36 Our dial-in modems hang occasionally when users run background jobs without redirecting stdin, stdout, and stderr. We are running 4.2 BSD. I got tired of unhanging them by hand so I wrote the following shell script to do exactly what I was doing manually after su-ing to root. This script would be called by cron several times a day. The problem is that the script would log people off! For some reason the "kill -HUP 1" seems to work differently in the script than it does manually. Does anybody know what might be happening? Thanks. #! /bin/csh -f # unhang dial-in lines set path=(/bin /usr/bin /usr/ucb /etc) setenv PATH /bin:/usr/bin:/usr/ucb:/etc cd /dev foreach i (`ls ttyd*`) set HERE=`w | grep -c $i` if ($HERE == 0) then echo "unhang $i" >/dev/console echo "unhang $i" ed /etc/ttys <