1
0
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:
Andrew Tridgell 2007-05-14 13:49:01 +10:00
parent 9e70b95159
commit d655a64b5b

View File

@ -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);
}