Why doesn't Apache2::SubProcess spawn my subprocess?
- by codeholic
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`
: $@;