commit 0192076bb8e5a11991718f76dfdd9505b8afd3e5
parent dd6c05bd26697e8f4f1ee434b8382683f5b64f80
Author: Kyle Milz <kyle@getaddrinfo.net>
Date: Mon, 2 Nov 2015 21:20:16 -0700
ps_fcgi: clarify some comments
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/ps_fcgi b/ps_fcgi
@@ -62,11 +62,12 @@ if (fork()) {
# parent
$0 = "ps_fcgi [priv]";
- # child should catch sigint and exit nicely, then we exit nicely here too
+ # child should catch sigint and exit nicely, then we exit nicely here
$SIG{INT} = "IGNORE";
print "info: parent: alive\n" if ($args{v});
syslog(LOG_INFO, "parent: alive");
+
wait();
print "info: parent: cleaning up\n" if ($args{v});
@@ -91,6 +92,7 @@ $( = $) = "$gid $gid";
$< = $> = $uid;
print "info: child: uid:gid appears to be $<:$(\n" if ($args{v});
+# catch ctrl-c and default kill(1) signal
$SIG{INT} = \&child_sig_handler;
$SIG{TERM} = \&child_sig_handler;
@@ -106,10 +108,11 @@ syslog(LOG_INFO, "child: ready");
print "info: child: ready\n" if ($args{v});
while ($request->Accept() >= 0) {
+ # header, XXX: cache control timestamps?
print "Content-Type: text/html\r\n\r\n";
- my (undef, $input) = split("=", $ENV{QUERY_STRING});
# incoming query string is http mangled
+ my (undef, $input) = split("=", $ENV{QUERY_STRING});
$input = uri_unescape($input);
# fuzzy search on manufacturer and part number