diff options
| author | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2009-12-15 10:23:58 +1100 |
|---|---|---|
| committer | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2009-12-15 10:23:58 +1100 |
| commit | db0d2a1b8f3dca579bd8060c1b8708f5af6a9a2b (patch) | |
| tree | cbdae58d549e628ec383b6af280990a377a5befc /ctdb/lib/talloc/talloc.h | |
| parent | 649ba2631dd07845e6117212e29c6113de1ae6cc (diff) | |
| download | samba-db0d2a1b8f3dca579bd8060c1b8708f5af6a9a2b.tar.gz samba-db0d2a1b8f3dca579bd8060c1b8708f5af6a9a2b.tar.xz samba-db0d2a1b8f3dca579bd8060c1b8708f5af6a9a2b.zip | |
From rusty:
Subject: eventscript: fix spinning at 100% cpu when child exits.
ctdbd was spinning reading 0 from a pipe, as soon as the first
eventscript finishes.
This was caused by the intersection between a78b8ea7168e "Run only one
event for each epoll_wait/select call" and 32cfdc3aec34 "eventscript:
ctdb_fork_with_logging()". Unavoidable mid-air collision, since both
worked fine and both were developed simultaneously.
When the script exits, we have two pipes open to it: one for any
stdout/stderr for logging (ctdb_log_handler), and one for the result
(ctdb_event_script_handler). The latter frees everything, including
the log fd and event structure.
We used to get one callback to ctdb_log_handler, which got a harmless
0-length read, then one to ctdb_event_script_handler which cleaned up.
Now we only do one callback per poll, we need the logging function to
clean itself up so we can make process.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 211ea7907e8e96041aa6f7d086551d64d065a8a3)
Diffstat (limited to 'ctdb/lib/talloc/talloc.h')
0 files changed, 0 insertions, 0 deletions
