chiark
/
gitweb
/
~ian
/
chiark-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fishdescriptor: Fix typo in help message
[chiark-utils.git]
/
cprogs
/
cgi-fcgi-test
diff --git
a/cprogs/cgi-fcgi-test
b/cprogs/cgi-fcgi-test
index 48dfbdc965104399b17df503aeb7c4e05a56c63c..3d5f0ed2a7016d83517697092738e270f8c6cf81 100755
(executable)
--- a/
cprogs/cgi-fcgi-test
+++ b/
cprogs/cgi-fcgi-test
@@
-9,7
+9,7
@@
BEGIN {
}
$SIG{'TERM'} = sub {
}
$SIG{'TERM'} = sub {
- eval { print REALSTDERR "[real-stderr] closing\n"; };
+ eval { print REALSTDERR "[
$$
real-stderr] closing\n"; };
exit 15;
};
exit 15;
};
@@
-18,16
+18,20
@@
use FCGI;
my $count = 0;
my $request = FCGI::Request();
my $count = 0;
my $request = FCGI::Request();
-warn;
+warn "[$$ starting]";
+print STDERR "[$$ stderr starting]\n";
+print REALSTDERR "[$$ real-stderr starting]\n";
while ($request->Accept >= 0) {
while ($request->Accept >= 0) {
+ my $ua = $ENV{HTTP_USER_AGENT} // '<none>';
print <<END;
Content-Type; text/plain
success
count=$count
print <<END;
Content-Type; text/plain
success
count=$count
+$ua
END
END
- print STDERR "[
stderr] serviced $count
.\n";
- print REALSTDERR "[
real-stderr] serviced $count
.\n";
+ print STDERR "[
$$ stderr] serviced $count ($ua)
.\n";
+ print REALSTDERR "[
$$ real-stderr] serviced $count ($ua)
.\n";
$count++;
}
$count++;
}