How to Write an Infinite Loop that doesn't Die when Program Dies
- From: kvnsmnsn@xxxxxxxxxxx
- Date: Thu, 13 Dec 2007 11:03:00 -0800 (PST)
I have a web server on a Linux platform that keeps dying if I give it
a big enough load, with nothing more than the message "Killed" on one
line. What I'd _like_ to do is write a shell script that goes into an
infinite loop calling this web server over and over again, so that as
soon as it dies it executes again. So I wrote:
#! /bin/sh
if [ $# == 1 ]
then
while [ 1 ]
do
~/Bin/ipcrmGroup.pl kvnsmnsn
echo "./Ws4Server $1"
~/public_html/CS360/Ws4Server $1
done
else
echo "Usage is"
echo " ./InfLoop <port>"
fi
Unfortunately, every time my web server dies, this script dies. How
can I run this web server in this loop in such a way that when the
web server is killed the loop keeps going?
---Kevin Simonson
"You'll never get to heaven, or even to LA,
if you don't believe there's a way."
from _Why Not_
.
- Follow-Ups:
- Re: How to Write an Infinite Loop that doesn't Die when Program Dies
- From: Barry Margolin
- Re: How to Write an Infinite Loop that doesn't Die when Program Dies
- Prev by Date: OT: Re: Shell equivalent of continue|break ???
- Next by Date: tricky shell question?
- Previous by thread: Req: Networking / Network Security consultants for Charlotte, NC
- Next by thread: Re: How to Write an Infinite Loop that doesn't Die when Program Dies
- Index(es):
Relevant Pages
|