From db74ec7441dcdd444ce2599ae196025bc5383bc3 Mon Sep 17 00:00:00 2001 From: Gleb Popov <6yearold@gmail.com> Date: Thu, 24 Jul 2025 10:43:40 +0300 Subject: mount_bsd.c: Actually report mount failures back to caller Signed-off-by: Gleb Popov <6yearold@gmail.com> --- lib/mount_bsd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/mount_bsd.c b/lib/mount_bsd.c index 5dba593..c12ab32 100644 --- a/lib/mount_bsd.c +++ b/lib/mount_bsd.c @@ -215,7 +215,9 @@ mount: } waitpid(pid, &status, 0); - _exit(EXIT_SUCCESS); + if (!WIFEXITED(status)) + _exit(EXIT_FAILURE); + _exit(WEXITSTATUS(status)); } if (waitpid(cpid, &status, 0) == -1 || WEXITSTATUS(status) != 0) { -- cgit v1.2.3