send() function failing kills the worker process

Maxim Dounin mdounin at
Fri Jun 25 15:49:05 MSD 2010


On Thu, Jun 24, 2010 at 05:46:31PM -0400, cjt72 wrote:

> I'm making an nginx module to communicate with my database.
> I'm trying to use the C send() function in my handler, but it seems that
> whenever send() fails it kills the whole process as opposed to just
> returning a -1.
> In the error log I get "error: network error". 
> Is there anyway I can suppress this behavior?

Calling C function send() never results in exit() on error, most 
likely you call it somewhere yourself, either directly or via 
something like BSD's err() wrapper.  Try posting your code if in 

Maxim Dounin

More information about the nginx mailing list