Discussion:
Unexpected exit
(too old to reply)
Andre
2014-05-28 18:19:05 UTC
Permalink
Raw Message
Hello
I just cloned your official git repo updating libevent and everything
works fine until I changed something that I can not figure out anymore.
Libevent exits the program with the code 141 every time at the same code
line.
In this line I call evbuffer_add. The buffer have to be valid because
the evbuffer_add I call one line before works fine. The pointer is valid
too.
The fatal callback defined by event_set_fatal_callback is not called.
Thanks in advance.
***********************************************************************
To unsubscribe, send an e-mail to ***@freehaven.net with
unsubscribe libevent-users in the body.
Aaron Sinclair
2014-05-29 02:49:45 UTC
Permalink
Raw Message
Post by Andre
Hello
I just cloned your official git repo updating libevent and everything
works fine until I changed something that I can not figure out
anymore.
Libevent exits the program with the code 141 every time at the same
code line.
In this line I call evbuffer_add. The buffer have to be valid because
the evbuffer_add I call one line before works fine. The pointer is
valid too.
The fatal callback defined by event_set_fatal_callback is not called.
Thanks in advance.
Hey Andre,

It may be exiting after receiving SIGPIPE. Can you run it in gdb & see
if it catches it?

If that's the case, you may want to add:

signal( SIGPIPE, SIG_IGN );

Cheers,
Aaron
***********************************************************************
To unsubscribe, send an e-mail to ***@freehaven.net with
unsubscribe libevent-users in the body.
Andre
2014-05-29 18:38:55 UTC
Permalink
Raw Message
I just added this code line in the beginning and the program doesn't
Post by Aaron Sinclair
signal( SIGPIPE, SIG_IGN );
But this is another problem because my client and my server were called
with BEV_EVENT_ERROR without actually closing the socket by myself. My
server says "Broken pipe" but my client doesn't close the socket..
Maybe this is due to the fact that I am using OpenSSL.
Anyways, I can't figure out what is happening and why the pipe is broken.
***********************************************************************
To unsubscribe, send an e-mail to ***@freehaven.net with
unsubscribe libevent-users in the body.
Andre
2014-05-30 10:11:53 UTC
Permalink
Raw Message
I found my oversight.
Thanks for your great help :)
***********************************************************************
To unsubscribe, send an e-mail to ***@freehaven.net with
unsubscribe libevent-users in the body.

Loading...