From: Patrick Donnelly Date: Thu, 12 Apr 2018 17:21:05 +0000 (-0700) Subject: common: ignore errors during preforker exit X-Git-Tag: v12.2.6~67^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c220207d86ec69ae4312f4629df80f7a4e35b321;p=ceph.git common: ignore errors during preforker exit Caller can't do anything useful and it obsecures the error the caller wants to return. Signed-off-by: Patrick Donnelly (cherry picked from commit 3f0b7d96f5cb96ff61c935777671ab7ddd94cfd3) --- diff --git a/src/common/Preforker.h b/src/common/Preforker.h index 9fe34e5ea0eb..f6671a5d302d 100644 --- a/src/common/Preforker.h +++ b/src/common/Preforker.h @@ -107,11 +107,8 @@ public: int signal_exit(int r) { if (forked) { - // tell parent. this shouldn't fail, but if it does, pass the - // error back to the parent. - int ret = safe_write(fd[1], &r, sizeof(r)); - if (ret <= 0) - return ret; + /* If we get an error here, it's too late to do anything reasonable about it. */ + (void)safe_write(fd[1], &r, sizeof(r)); } return r; }