summaryrefslogtreecommitdiff
path: root/ctdb/server/ctdb_call.c
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2014-07-30 21:03:53 +1000
committerAmitay Isaacs <amitay@samba.org>2014-08-21 04:46:13 +0200
commitc1558adeaa980fb4bd6177d36250ec8262e9b9fe (patch)
tree6fa97d8445700bdbd52429f1335a96e721f193ce /ctdb/server/ctdb_call.c
parentfcd6ee1eac8627e75f72019027513cc46429a3a9 (diff)
downloadsamba-c1558adeaa980fb4bd6177d36250ec8262e9b9fe.tar.gz
ctdb: Use sys_read() and sys_write() to ensure correct signal interaction
... and avoid compiler warnings in some cases. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/server/ctdb_call.c')
-rw-r--r--ctdb/server/ctdb_call.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ctdb/server/ctdb_call.c b/ctdb/server/ctdb_call.c
index a4fa03d8778..54c6d770e14 100644
--- a/ctdb/server/ctdb_call.c
+++ b/ctdb/server/ctdb_call.c
@@ -1457,7 +1457,7 @@ static void revokechild_handler(struct event_context *ev, struct fd_event *fde,
int ret;
char c;
- ret = read(rc->fd[0], &c, 1);
+ ret = sys_read(rc->fd[0], &c, 1);
if (ret != 1) {
DEBUG(DEBUG_ERR,("Failed to read status from revokechild. errno:%d\n", errno));
rc->status = -1;
@@ -1675,7 +1675,7 @@ int ctdb_start_revoke_ro_record(struct ctdb_context *ctdb, struct ctdb_db_contex
c = ctdb_revoke_all_delegations(ctdb, ctdb_db, tdata, key, header, data);
child_finished:
- write(rc->fd[1], &c, 1);
+ sys_write(rc->fd[1], &c, 1);
/* make sure we die when our parent dies */
while (ctdb_kill(ctdb, parent, 0) == 0 || errno != ESRCH) {
sleep(5);