jonathanstowe / raku-fastcgi-nativecall

An implementation of FastCGI using NativeCall
Other
5 stars 3 forks source link

Don’t call exit when opening the socket fails #3

Open zopsicle opened 4 years ago

zopsicle commented 4 years ago

Apparently libfcgi calls perror and exit when it cannot open the listening socket, which is rather brutal. Not sure if fixing that would be in the scope of this project, in contrast with fixing it upstream.

FastCGI::NativeCall.new(path => '/tmp/foo/bar.sock');
# expected behavior: throw exception or return failure
# actual behavior: call to exit()
jonathanstowe commented 4 years ago

Yeah, that is a bit crap really. As this is basically using a fork of the libfcgi I think it would be easiest just to fix it here. I'll take a look in the next week or so.

Thanks for the report.

jonathanstowe commented 4 years ago

It seems that the os_unix.c has exit all over the place, I'll have to think about how to signal the failure to the module and handle it appropriately a bit harder.