Why doesn't Apache2::SubProcess spawn my subprocess?
Posted
by codeholic
on Stack Overflow
See other posts from Stack Overflow
or by codeholic
Published on 2010-04-01T08:37:31Z
Indexed on
2010/04/15
6:43 UTC
Read the original article
Hit count: 599
The following script works without errors, but /tmp/test.touch
is not being created (even being checked later in the command line). It seems to me as if $r->spawn_proc_prog
doesn't spawn a process. What may cause the problem?
#!/usr/bin/perl
use strict;
use warnings;
use Apache2::RequestUtil;
use Apache2::SubProcess ();
my $r = Apache2::RequestUtil->request;
print "Content-Type: text/plain\n\n";
print eval { $r->spawn_proc_prog('/usr/bin/touch', ['/tmp/test.touch']) }
? `ls -l /tmp/test.touch`
: $@;
© Stack Overflow or respective owner