Bug 10012 - tevent_loop_wait() never finishes
tevent_loop_wait() never finishes
Product: Samba 4.0
Classification: Unclassified
Component: Other
All All
: P5 normal
: ---
Assigned To: Stefan Metzmacher
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2013-07-11 12:57 UTC by Andreas Schneider
Modified: 2013-08-07 09:59 UTC (History)
6 users (show)

See Also:

reproducer (1.10 KB, text/plain)
2013-07-11 12:58 UTC, Andreas Schneider
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2013-07-11 12:57:44 UTC
If a signal handler is registered and unregistered later, tevent_loop_wait() never finishes.

This is because tevent internally registers its own signal handler "sig_pipe_handler". This handler is never removed, which causes program to stuck in tevent_loop_wait() even if there are no custom handlers registered.
Comment 1 Andreas Schneider 2013-07-11 12:58:43 UTC
Created attachment 9039 [details]

gcc -ltalloc -ltevent tevent_loop_forever.c -o tevent_loop_forever
Comment 2 Stefan Metzmacher 2013-08-07 09:59:18 UTC
Fixed with tevent-0.9.19