From 02f1d90bdaa075141efdd614c10e95570e5d38ee Mon Sep 17 00:00:00 2001 From: Tony Finch Date: Wed, 15 May 2002 16:50:09 +0000 Subject: Report errors properly if wait() fails. PR: 30543 Approved by: dwmalone (mentor) MFC after: 3 weeks --- usr.bin/xinstall/xinstall.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index 5253432c4c355..92f30d0dc88bc 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -720,8 +720,9 @@ strip(to_name) err(EX_OSERR, "exec(%s)", stripbin); default: if (wait(&status) == -1 || status) { + serrno = errno; (void)unlink(to_name); - exit(EX_SOFTWARE); + errc(EX_SOFTWARE, serrno, "wait"); /* NOTREACHED */ } } -- cgit v1.3