I realize that closing stderr was generally a bad thing for me to do, but I wouldn't expect accidentally doing that would cause Mojolicious to hang for 40 seconds. Hanging (and possibly crashing) like this is a severe and unexpected consequence of this accident. Not sure what a better behavior would be, other than exiting more quickly with some oddball exit status which might stand out in Mojolicious source code.
Steps to reproduce the behavior
mojo generate lite-app
# edit close(STDERR); into myapp.pl
./myapp.pl get /foo
Expected behavior
The sample app should write the rendered response to stdout, without logging to stderr.
Actual behavior
The sample app hangs for 40 seconds and then produces no response.
Just don't close STDERR, best practice is to reopen it to /dev/null if you really don't care about it. That said, i'd always want STDERR output in my systemd journal.
I realize that closing stderr was generally a bad thing for me to do, but I wouldn't expect accidentally doing that would cause Mojolicious to hang for 40 seconds. Hanging (and possibly crashing) like this is a severe and unexpected consequence of this accident. Not sure what a better behavior would be, other than exiting more quickly with some oddball exit status which might stand out in Mojolicious source code.
Steps to reproduce the behavior
Expected behavior
The sample app should write the rendered response to stdout, without logging to stderr.
Actual behavior
The sample app hangs for 40 seconds and then produces no response.