From owner-freebsd-hackers Wed Mar 4 21:17:19 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA01722 for freebsd-hackers-outgoing; Wed, 4 Mar 1998 21:17:19 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from picasso.wcape.school.za (picasso.wcape.school.za [196.21.102.12]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id VAA01669 for ; Wed, 4 Mar 1998 21:16:55 -0800 (PST) (envelope-from pvh@leftside.wcape.school.za) Received: from uucp by picasso.wcape.school.za with local-rmail (Exim 1.82 #2) id 0yAT1Y-00068m-00; Thu, 5 Mar 1998 07:16:52 +0200 Received: from localhost (pvh@localhost) by leftside.wcape.school.za (8.8.4/8.8.4) with SMTP id HAA17997 for ; Thu, 5 Mar 1998 07:13:06 +0200 (SAT) Date: Thu, 5 Mar 1998 07:13:05 +0200 (SAT) From: Peter van Heusden To: freebsd-hackers@FreeBSD.ORG Subject: Doing a reboot from a CGI script? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi I'm busy writing a set of scripts to make the management of a FreeBSD box easier (basically provide a WWW interface to manage UUCP, Squid, etc). One of the capabilities I want to build in is the ability to reboot the machine by pressing a button on a HTML page. I've tried doing this by running '/sbin/reboot' from the cgi-bin script (which is written in perl), but all that happens is that all processes are killed, and the reboot process stops there. I would imagine that somehow this means that the through killing the httpd process, the cgi-bin script and thus the reboot process have died. This seems to happen even if I fork a process from the cgi-bin script. Is there any way to get around this? Has anyone tried this before? Thanks for any info, Peter -- Peter van Heusden | Computers Networks Reds Greens Justice Peace Beer Africa pvh@leftside.wcape.school.za | Support the SAMWU 50 litres campaign! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message