-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Well its catching the signal allright, but you do the wrong things in
your signal handler.
The event_del and _free calls are probably not good to call from a
signal handler. I guess the dispatch after that fails.
You could call exit(0), or event_loopexit(0); right after the printf.

Best regards,
   Wouter

[EMAIL PROTECTED] wrote:
> Hi,
>
> I'm not a good expert of C, but trying to build a simple example using
> libevent.
>
> I've succesfully build a very simple http server with the stupid "Hello
> World" message.
>
> Now I'm trying to capture a SIGINT as shown in "sample/signal-test.c"
>  present in the libevent tar file.
>
> Unfortunately, I receive a segmentation fault
> "
> *** glibc detected *** ./test: double free or corruption (!prev):
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFHDI/XkDLqNwOhpPgRAqG7AKCVzg2bBvDsUh/CULtnXFUtpW9WDACgtNoG
68q3saH1loTQ0YIW8anccvk=
=+Xe0
-----END PGP SIGNATURE-----
_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkey.org/mailman/listinfo/libevent-users

Reply via email to