Netscape's Stale Lock Files -- Automatic Removal
I grew weary of starting Netscape after it crashed only to get the
message about there being a stale lock file. So I added this small
script to my Netscape wrapper. It seems to work. Is there a better
way of doing this?
-------------BEGIN------------------
for lockfile in `find $HOME/.netscape -name lock`
do
lockpid=`ls -l $lockfile | sed 's/^.*://g' `
(ps --pid $lockpid | grep "$lockpid.*netscape") > /dev/null 2>&1
if [ "$?" -ne 0 ]
then
rm $lockfile
echo "Removed stale lock $lockfile -- $lockpid."
else
echo "Not Removing lock for $lockfile -- $lockpid."
fi
done
------------END---------------------
Thanks
Paul Serice
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: