Subject: Re: Radius (Livingston) on NetBSD
To: Andrew Brown <codewarrior@daemon.org>
From: Giles Lean <giles@nemeton.com.au>
List: port-i386
Date: 04/23/1997 08:19:54
On Tue, 22 Apr 1997 17:46:09 -0400 (EDT)  Andrew Brown wrote:

> would anyone be interested in adding a cute little respawning daemon
> to the tree?  something that runs a program and then starts it again
> when it dies?

On SysV init will do this for you, of course.  Usually on *BSD
something like the following is sufficient, although it runs in a
tight loop if you ask it to start something that fails immediately.

	#! /bin/sh

	case "$#" in
	0)	echo "usage: restart command [arg ...]" 1>&2
		exit 1
		;;
	esac

	while :
	do
		"$@"
	done

Regards,

Giles