chiark / gitweb /
cgi-fcgi-interp: test script prints pids etc.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 29 Mar 2016 20:26:28 +0000 (21:26 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 29 Mar 2016 20:26:28 +0000 (21:26 +0100)
cprogs/cgi-fcgi-test

index 48dfbdc..4c8d7b7 100755 (executable)
@@ -9,7 +9,7 @@ BEGIN {
 }
 
 $SIG{'TERM'} = sub {
-    eval { print REALSTDERR "[real-stderr] closing\n"; };
+    eval { print REALSTDERR "[$$ real-stderr] closing\n"; };
     exit 15;
 };
 
@@ -18,7 +18,9 @@ use FCGI;
 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) {
     print <<END;
@@ -27,7 +29,7 @@ Content-Type; text/plain
 success
 count=$count
 END
-    print STDERR "[stderr] serviced $count.\n";
-    print REALSTDERR "[real-stderr] serviced $count.\n";
+    print STDERR "[$$ stderr] serviced $count.\n";
+    print REALSTDERR "[$$ real-stderr] serviced $count.\n";
     $count++;
 }