summaryrefslogtreecommitdiff
path: root/ctdb/server/ctdb_vacuum.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_vacuum.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_vacuum.c')
-rw-r--r--ctdb/server/ctdb_vacuum.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ctdb/server/ctdb_vacuum.c b/ctdb/server/ctdb_vacuum.c
index c3054bfbbff..5013339c23f 100644
--- a/ctdb/server/ctdb_vacuum.c
+++ b/ctdb/server/ctdb_vacuum.c
@@ -1411,7 +1411,7 @@ static void vacuum_child_handler(struct event_context *ev, struct fd_event *fde,
DEBUG(DEBUG_INFO,("Vacuuming child process %d finished for db %s\n", child_ctx->child_pid, child_ctx->vacuum_handle->ctdb_db->db_name));
child_ctx->child_pid = -1;
- ret = read(child_ctx->fd[0], &c, 1);
+ ret = sys_read(child_ctx->fd[0], &c, 1);
if (ret != 1 || c != 0) {
child_ctx->status = VACUUM_ERROR;
DEBUG(DEBUG_ERR, ("A vacuum child process failed with an error for database %s. ret=%d c=%d\n", child_ctx->vacuum_handle->ctdb_db->db_name, ret, c));
@@ -1503,7 +1503,7 @@ ctdb_vacuum_event(struct event_context *ev, struct timed_event *te,
}
cc = ctdb_vacuum_and_repack_db(ctdb_db, full_vacuum_run);
- write(child_ctx->fd[1], &cc, 1);
+ sys_write(child_ctx->fd[1], &cc, 1);
_exit(0);
}