From a59f9b21b008410e24119313dcf98d67aad10c89 Mon Sep 17 00:00:00 2001 From: Morris Jette <jette@schedmd.com> Date: Fri, 10 Apr 2015 16:00:41 -0700 Subject: [PATCH] Improve logging of save_read Add logging of premature EOF --- src/common/slurm_protocol_defs.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common/slurm_protocol_defs.h b/src/common/slurm_protocol_defs.h index c8a4f257678..95a7770ed66 100644 --- a/src/common/slurm_protocol_defs.h +++ b/src/common/slurm_protocol_defs.h @@ -1330,9 +1330,11 @@ extern char *rpc_num2string(uint16_t opcode); int rc; \ while (remaining > 0) { \ rc = read(fd, ptr, remaining); \ - if ((rc == 0) && (remaining == size)) \ + if ((rc == 0) && (remaining == size)) { \ + debug("%s:%d: %s: safe_read EOF", \ + __FILE__, __LINE__, __CURRENT_FUNC__); \ goto rwfail; \ - else if (rc == 0) { \ + } else if (rc == 0) { \ debug("%s:%d: %s: safe_read (%d of %d) EOF", \ __FILE__, __LINE__, __CURRENT_FUNC__, \ remaining, (int)size); \ -- GitLab