Date: Fri, 5 Jul 2002 14:45:46 +0100 From: Daniel Bye <dan@slightlystrange.org> To: questions@freebsd.org Subject: Re: Limiting users Message-ID: <20020705134546.GB34546@catflap.home.slightlystrange.or> In-Reply-To: <000501c22355$38743f50$4acea3ca@hobbes> References: <000501c22355$38743f50$4acea3ca@hobbes>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 04, 2002 at 08:20:43PM +0800, dnu wrote: > Hello, > > A number of my users run a bouncer. But when they make changes > to the config file, they start up another instance of the bouncer > w/o killing the old one that's already running in the background. > > Is there a way to limit them to only one background process? > Unfortunately, this may also prevent other programs - like man - > from functioning properly. > > I guess my question now is how do I keep users from running > multiple instances of the same program? Without having to do the > killing myself, of course. :) > You could probably write a wrapper script for it - get the wrapper to write a pidfile, or something, and check for one each time a new process is started. It can then either kill the existing process and start a new one, or simply complain so the user has to do it. You will need to make sure the pidfile gets refreshed, or you will find yourself taking lots of calls about their processes not working... ;-) Just a thought, but it might work. Dan -- Daniel Bye PGP Key: ftp://ftp.slightlystrange.org/pgpkey/dan.asc PGP Key fingerprint: 3D73 AF47 D448 C5CA 88B4 0DCF 849C 1C33 3C48 2CDC _ ASCII ribbon campaign ( ) - against HTML, vCards and X - proprietary attachments in e-mail / \ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020705134546.GB34546>