From owner-freebsd-questions@FreeBSD.ORG Wed Feb 22 11:21:12 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 1A26216A420 for ; Wed, 22 Feb 2006 11:21:12 +0000 (GMT) (envelope-from alec@thened.net) Received: from empmail.bowdoin.edu (empmail.bowdoin.edu [139.140.14.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id A8CEA43D5A for ; Wed, 22 Feb 2006 11:21:11 +0000 (GMT) (envelope-from alec@thened.net) Received: from shredder.bowdoin.edu ([139.140.181.133]) by empmail.bowdoin.edu (Sun Java System Messaging Server 6.1 HotFix 0.01 (built Jun 24 2004)) with ESMTPP id <0IV300HQQ67ANF70@empmail.bowdoin.edu> for freebsd-questions@freebsd.org; Wed, 22 Feb 2006 06:21:11 -0500 (EST) Received: by shredder.bowdoin.edu (Postfix, from userid 12008) id 7AB3CCC87; Wed, 22 Feb 2006 06:21:10 -0500 (EST) Date: Wed, 22 Feb 2006 11:21:10 +0000 From: Alec Berryman In-reply-to: <43FC380E.9020808@chamonix.reportlab.co.uk> To: freebsd-questions@freebsd.org Message-id: <20060222112110.GA40475@thened.net> MIME-version: 1.0 Content-type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary=bg08WKrSYDhXBjb5 Content-disposition: inline X-Ned-Wuz-Here: Yes X-GPG-Fingerprint: 3DB5 8785 53D9 8BF4 5049 B6B9 02E7 7FD9 881C 85C4 X-GPG-Key-ID: 881C85C4 References: <43FC380E.9020808@chamonix.reportlab.co.uk> User-Agent: Mutt/1.5.11 Subject: Re: denyhosts X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2006 11:21:12 -0000 --bg08WKrSYDhXBjb5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Robin Becker on 2006-02-22 10:08:14 +0000: > I'm trying out the denyhosts port; it starts up and performs as expected, > but it won't recognize a running instance as this python if test fails. I= s=20 > there a more freebsd way for python to find out if a given process is=20 > running? >=20 > if os.access(os.path.join("/proc", str(pid)), os.F_OK): > return pid > else: > return STATE_LOCK_EXISTS I assume you don't have /proc mounted; see procfs(5). --bg08WKrSYDhXBjb5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (FreeBSD) iD8DBQFD/EkmAud/2YgchcQRAtcpAKCD7ZKAsHjPeoW4EYZv7lnLChchLgCgnZbj FdnfbDVYZ5yjvFN/8m378tE= =YzHz -----END PGP SIGNATURE----- --bg08WKrSYDhXBjb5--