Hi Rauan,

Set your daemon to ignore SIGPIPE.
Or register an empty signal handler for SIGPIPE.

Code from my own daemon that had this too:
   if(signal(SIGPIPE, SIG_IGN) == SIG_ERR)
      ... print errno

Best regards,
    Wouter

On 06/26/2009 09:01 AM, Rauan Maemirov wrote:
> Hi, all.
> I'm having issues with libevent.
>
> When I use siege or something like that, everything's ok. But when I
> open link in browser, and start to push F5 like a crazy, daemon exits.
> Valgrind shows:
>
> ...
> Process terminating with default action of signal 13 (SIGPIPE)
> ==5635==    at 0x5B2BF90: write (in /lib/libc-2.9.so)
> ==5635==    by 0x4E335BF: evbuffer_write (buffer.c:414)
> ==5635==    by 0x4E38819: evhttp_write (http.c:685)
> ==5635==    by 0x4E33297: event_base_loop (event.c:392)
> ==5635==    by 0x402E5F: main (myapp.c:283) // here goes event_dispatch()
> --5879-- Discarding syms at 0x91db2e0-0x91e0498 in
> /lib/libnss_compat-2.9.so due to munmap()
> --5879-- Discarding syms at 0x93e5040-0x93eb408 in
> /lib/libnss_nis-2.9.so due to munmap()
> --5879-- Discarding syms at 0x95f0020-0x95f7c48 in
> /lib/libnss_files-2.9.so due to munmap()
> ...
>
> I deem, it's because of interrupted connections. How should I handle it?
> _______________________________________________
> Libevent-users mailing list
> Libevent-users@monkey.org
> http://monkeymail.org/mailman/listinfo/libevent-users

_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users

Reply via email to