mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
kill the lockwait child if the pipe goes away
(This used to be ctdb commit bdfa8ba9932fade074a05a6cb6bc14ae3b84618c)
This commit is contained in:
parent
9e70b95159
commit
d655a64b5b
@ -131,7 +131,9 @@ struct lockwait_handle *ctdb_lockwait(struct ctdb_db_context *ctdb_db,
|
||||
close(result->fd[0]);
|
||||
tdb_chainlock(ctdb_db->ltdb->tdb, key);
|
||||
write(result->fd[1], &c, 1);
|
||||
pause();
|
||||
/* this read will exit when the parent closes its end
|
||||
of the pipe, or the parent dies */
|
||||
read(result->fd[1], &c, 1);
|
||||
_exit(0);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user