From owner-freebsd-questions Thu May 8 09:26:12 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id JAA05684 for questions-outgoing; Thu, 8 May 1997 09:26:12 -0700 (PDT) Received: from d2si.com (macbeth.d2si.com [206.8.31.2]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id JAA05674 for ; Thu, 8 May 1997 09:26:07 -0700 (PDT) Received: (from alec@localhost) by d2si.com (8.8.5/8.8.5) id LAA08599; Thu, 8 May 1997 11:25:47 -0500 (CDT) From: Alec Kloss Message-Id: <199705081625.LAA08599@d2si.com> Subject: Re: Keeping a process running In-Reply-To: <01BC5BA1.7F07A140@dans-zyga-pc.zyga.com> from Dan Wolfe at "May 8, 97 11:18:02 am" To: dwolfe@zyga.com (Dan Wolfe) Date: Thu, 8 May 1997 11:25:47 -0500 (CDT) Cc: questions@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Dan Wolfe is responsible for: > From owner-freebsd-questions@FreeBSD.ORG Thu May 8 11:16:10 1997 > Message-ID: <01BC5BA1.7F07A140@dans-zyga-pc.zyga.com> > From: Dan Wolfe > To: "'questions@freebsd.org'" > Subject: Keeping a process running > Date: Thu, 8 May 1997 11:18:02 -0400 > X-MIME-Autoconverted: from quoted-printable to 8bit by hub.freebsd.org id IAA03899 > Sender: owner-questions@FreeBSD.ORG > X-Loop: FreeBSD.org > Precedence: bulk > Hi everyone, > > I have a process called 'startslip' in FreeBSD that I want > to periodically check using cron to make sure it is still > running, and if it has stopped, to restart it. Can anyone > give ideas on the best way to accomplish this? > > -Dan > You could wrap another script around the staring of startslip: #!/bin/csh while (1) startslip end which perhaps gives you the effect you want. Of course, if something goes horribly wrong with startslip so it exits immediately, you've got a CPU killing infinite loop. If you are using 'startslip' to start dip to dial in a slip connection, I'd recommend smartening up the dip script to redial automatically.