Bug 10012 - tevent_loop_wait() never finishes
Summary: tevent_loop_wait() never finishes
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Stefan Metzmacher
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-11 12:57 UTC by Andreas Schneider
Modified: 2013-08-07 09:59 UTC (History)
6 users (show)

See Also:


Attachments
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]
reproducer

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