1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

When setting up the logging, set the event to trigger a read of a log message from a child process as a child of the "log" structure and not the ctdb structure,

or else we can crash if we receive log messages from a child but the log structure has been freed()

(This used to be ctdb commit ea9e39369379939abf6a4076fa2014c10c1a9ad0)
This commit is contained in:
Ronnie Sahlberg 2009-12-15 10:45:18 +11:00
parent db0d2a1b8f
commit e2e30df2e9

View File

@ -509,7 +509,7 @@ int ctdb_set_child_logging(struct ctdb_context *ctdb)
return -1;
}
event_add_fd(ctdb->ev, ctdb, p[0], EVENT_FD_READ,
event_add_fd(ctdb->ev, ctdb->log, p[0], EVENT_FD_READ,
ctdb_log_handler, ctdb->log);
set_close_on_exec(p[0]);
ctdb->log->pfd = p[0];