From owner-freebsd-questions@FreeBSD.ORG Mon Nov 24 02:51:32 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA18B16A4CE for ; Mon, 24 Nov 2003 02:51:32 -0800 (PST) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9CF8E43F93 for ; Mon, 24 Nov 2003 02:51:29 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) hAOApIqt015504 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 24 Nov 2003 10:51:24 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id hAOApIXv015503 for freebsd-questions@FreeBSD.ORG; Mon, 24 Nov 2003 10:51:18 GMT (envelope-from matthew) Date: Mon, 24 Nov 2003 10:51:18 +0000 From: Matthew Seaman To: freebsd-questions@FreeBSD.ORG Message-ID: <20031124105118.GA14538@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , freebsd-questions@FreeBSD.ORG References: <3B75ECFD-1DE6-11D8-A141-000A95DBBE34@mercurycloud.net> <20031123215725.GC557@dds.nl> <98017B2C-1E17-11D8-A141-000A95DBBE34@mercurycloud.net> <20031124011139.GA60027@dds.nl> <20031124011921.GC96651@users.munk.nu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NzB8fVQJ5HfG6fxh" Content-Disposition: inline In-Reply-To: <20031124011921.GC96651@users.munk.nu> User-Agent: Mutt/1.5.5.1i X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham version=2.60 X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on happy-idiot-talk.infracaninophile.co.uk Subject: Re: daemon monitoring X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2003 10:51:32 -0000 --NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 24, 2003 at 01:19:21AM +0000, Jez Hancock wrote: > - for each pid, send a CHLD signal to the pid Careful -- not all processes will be set up to deal with SIGCHLD, and some of them will be set up to deal with it in ways that don't meet your expectations. You can use signal '0' to test if a process of a given PID exists, without obnoxious side effects: % kill -0 $$ % echo $? 0 % kill -0 999 999: No such process % echo $? 1 However you need to be careful as kill is a shell built-in in many shells -- tcsh(1) has a built-in but it behaves just like /bin/kill in this case. sh(1) and bash(1) seem not to use a built-in. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --NzB8fVQJ5HfG6fxh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/weKmdtESqEQa7a0RAkI4AJ92/eJl5O/40I+mkhgQERSoIiVtTACghQhA yqHKNla1fnKuUBWYIYRZdQA= =v821 -----END PGP SIGNATURE----- --NzB8fVQJ5HfG6fxh--