Re: How to restart the root server from within modperl?

2003-08-14 Thread Frank Maas
On Tue, Aug 12, 2003 at 11:50:01AM +0200, Dirk Lutzebaeck wrote: Dennis Stout writes: On a whim, I would try writing a second script to do the actual shutdown and restart of Apache. Then have your mod_perl program either run it in the background (with a ) or fork it into another

Re: How to restart the root server from within modperl?

2003-08-14 Thread Dirk Lutzebaeck
Martin Langhoff writes: how can I restart the root httpd server from within modperl? Use `at` to schedule it a minute in the future -- effectively forking it. Yes, also thought of that but the smallest unit of 'at' is minutes and I want to restart the server immediately. Note that

RE: How to restart the root server from within modperl?

2003-08-14 Thread Egor Shipovalov
. -Original Message- From: Dirk Lutzebaeck [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 12, 2003 1:17 To: [EMAIL PROTECTED] Subject: How to restart the root server from within modperl? Hi, how can I restart the root httpd server from within modperl? My problem

Re: How to restart the root server from within modperl?

2003-08-14 Thread Torsten Foertsch
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tuesday 12 August 2003 11:50, Dirk Lutzebaeck wrote: Dennis Stout writes: On a whim, I would try writing a second script to do the actual shutdown and restart of Apache. Then have your mod_perl program either run it in the background

Re: How to restart the root server from within modperl?

2003-08-14 Thread Dirk Lutzebaeck
Thanks, I made it a bit more simple: use POSIX; if (! fork) { # child setsid; POSIX::close(0); POSIX::close(1); exec(restart-apache-command); } Works great! Thanks, Dirk Torsten Foertsch writes: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tuesday

RE: How to restart the root server from within modperl?

2003-08-14 Thread Egor Shipovalov
Can I call something like a reload of httpd.conf? This is what sending a SIGHUP to Apache does. However, both mod_perl-enabled servers I run misbehave on this, so I always do a full restart. Egor.

Re: How to restart the root server from within modperl?

2003-08-14 Thread Martin Langhoff
how can I restart the root httpd server from within modperl? Use `at` to schedule it a minute in the future -- effectively forking it. Note that normally apache starts as root and runs as an unprivileged user. If this is the case you _can_ achieve it using a suid wrapper or sudo, but you'll

How to restart the root server from within modperl?

2003-08-14 Thread Dirk Lutzebaeck
Hi, how can I restart the root httpd server from within modperl? My problem is that when I call system() with say apachectl restart the father process is stopped killing the children including the apachectl itself. So it can't start of again. Can I call something like a reload of httpd.conf?

RE: How to restart the root server from within modperl?

2003-08-14 Thread Egor Shipovalov
[mailto:[EMAIL PROTECTED] Sent: Tuesday, August 12, 2003 1:17 To: [EMAIL PROTECTED] Subject: How to restart the root server from within modperl? Hi, how can I restart the root httpd server from within modperl? My problem is that when I call system() with say apachectl restart the father

Re: How to restart the root server from within modperl?

2003-08-14 Thread Dirk Lutzebaeck
Dennis Stout writes: On a whim, I would try writing a second script to do the actual shutdown and restart of Apache. Then have your mod_perl program either run it in the background (with a ) or fork it into another process. Did exactly that but is has the effect that when the parent

Re[2]: How to restart the root server from within modperl?

2003-08-12 Thread Mike P. Mikhailov
Hello Dirk Lutzebaeck, Tuesday, August 12, 2003, 3:50:01 PM, you wrote: DL Dennis Stout writes: DL On a whim, I would try writing a second script to do the actual shutdown and DL restart of Apache. DL DL Then have your mod_perl program either run it in the background (with a ) or DL