From owner-freebsd-questions Tue Oct 16 6:45:27 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail11.svr.pol.co.uk (mail11.svr.pol.co.uk [195.92.193.23]) by hub.freebsd.org (Postfix) with ESMTP id 61F8537B407 for ; Tue, 16 Oct 2001 06:45:25 -0700 (PDT) Received: from modem-1099.arbok.dialup.pol.co.uk ([217.135.20.75] helo=jessikat.fsnet.co.uk) by mail11.svr.pol.co.uk with esmtp (Exim 3.13 #0) id 15tUX5-0001NG-00 for freebsd-questions@freeBSD.ORG; Tue, 16 Oct 2001 14:45:24 +0100 Message-ID: Date: Tue, 16 Oct 2001 14:43:58 +0100 To: freebsd-questions@freeBSD.ORG From: Robin Becker Subject: Re: Apache cgi in the background. References: <7mCP+IAxpCz7EwJA@jessikat.fsnet.co.uk> In-Reply-To: <7mCP+IAxpCz7EwJA@jessikat.fsnet.co.uk> MIME-Version: 1.0 X-Mailer: Turnpike Integrated Version 5.01 U <8fY3TEtAaFySF58ErPUfo9YLW3> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In article <7mCP+IAxpCz7EwJA@jessikat.fsnet.co.uk>, Robin Becker writes >I would like to start a long running job form an apache cgi script, but >I can't seem to get the job to detach and run asynchronously. > >Does any body know how to accomplish this? well I figured out that something of the form cd $WDIR;/usr/bin/nohup /usr/local/bin/detach command args works, but I'm not sure if I need the nohup. Also I need to lock this command so no one starts another job from the web. Is there an easy way to lock sh scripts? -- Robin Becker To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message