Date: Mon, 24 Nov 2003 10:51:18 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: freebsd-questions@FreeBSD.ORG Subject: Re: daemon monitoring Message-ID: <20031124105118.GA14538@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <20031124011921.GC96651@users.munk.nu> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031124105118.GA14538>