Author: stas
Date: Sat Feb 19 09:23:12 2005
New Revision: 154425
URL: http://svn.apache.org/viewcvs?view=rev&rev=154425
Log:
should chdir / as well when detaching a process
Modified:
perl/modperl/docs/trunk/src/docs/2.0/api/Apache/SubProcess.pod
Modified: perl/modperl/docs/trunk/src/docs/2.0/api/Apache/SubProcess.pod
URL:
http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/src/docs/2.0/api/Apache/SubProcess.pod?view=diff&r1=154424&r2=154425
==============================================================================
--- perl/modperl/docs/trunk/src/docs/2.0/api/Apache/SubProcess.pod (original)
+++ perl/modperl/docs/trunk/src/docs/2.0/api/Apache/SubProcess.pod Sat Feb 19
09:23:12 2005
@@ -167,6 +167,7 @@
use POSIX 'setsid';
+ chdir '/' or die "Can't chdir to /: $!";
open STDIN, '/dev/null' or die "Can't read /dev/null: $!";
open STDOUT, '+>>', '/path/to/apache/error_log'
or die "Can't write to /dev/null: $!";
@@ -177,7 +178,8 @@
reopening (or closing) the STD streams and called C<setsid()> makes
sure that the process is now fully detached from Apache and has a life
-of its own.
+of its own. C<chdir()> ensures that no partition is tied, in case you
+need to remount it.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]