holandes777 has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; use Time::HiRes qw (usleep time gettimeofday); use CGI qw/:standard *table start_ul use_named_parameters/; # load + standard CGI routines use CGI::Carp qw /fatalsToBrowser/; print "Content-Type:text/html\r\n\r\n"; print "<HTML>\n"; print "<HEAD></HEAD>\n"; print "<BODY>\n"; print "<CENTER>\n"; my $sleep = 100; my $t1 = time; print "using sleep of $sleep<BR>\n"; print "start time $t1<BR>\n"; # this was taken from the 2004 example vvvvvvvvvvvvvv my $pid = fork; die "Error forking: $!" unless defined $pid; if (!$pid) { my $pid = fork; die "Error forking: $!" unless defined $pid; if (!$pid) { exec("sleep $sleep &"); # << except for this, changed from "f +oo" } else { CORE::exit; } } # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ my $t2 = time; my $tdiff = $t2 - $t1; print "end time $t2<BR>\n"; print "difference = $tdiff<BR>\n"; print "</CENTER>\n"; print "</BODY>\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: apache2 and system ... cotinued from 2004
by ikegami (Patriarch) on Aug 18, 2009 at 14:10 UTC | |
by holandes777 (Scribe) on Aug 18, 2009 at 20:49 UTC | |
|
Re: apache2 and system ... cotinued from 2004
by holandes777 (Scribe) on Aug 20, 2009 at 18:18 UTC | |
by afoken (Chancellor) on Aug 22, 2009 at 16:04 UTC |