Subject: | STDERR lost at abnormal termination |
If my program terminates abnormally, I will not see the error message
sent to STDERR in my webserver error log. Probably because the program
only sends any data to the webserver at the $request->respond or
$request->finish functions, so if it dies before that, no data is sent
back.
I tried a workaround by using Capture::Tiny, and by redirecting STDERR to
a file in the script which starts my program, I am able to see the die
message in this other file, but not in the webserver error log.
Is there any other way to send the STDERR to the webserver? For example
with CGI::Fast, it works by default. Thanks.
PS: tried with nginx, debian, perl 5.14.2 and 5.10.1