From bf25c3a43f79f568b55c45e2701f5c961977b47c Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sun, 15 Mar 2009 01:04:50 +0000 Subject: 26735: Check some function return values for failures. Gets rid of some compiler warnings, and improves error handling/notification. --- Src/exec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Src/exec.c') diff --git a/Src/exec.c b/Src/exec.c index ed7c08759..4f15ebefa 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -2722,7 +2722,8 @@ execcmd(Estate state, int input, int output, int how, int last1) #ifdef HAVE_NICE /* Check if we should run background jobs at a lower priority. */ if ((how & Z_ASYNC) && isset(BGNICE)) - nice(5); + if (nice(5) < 0) + zwarn("nice(5) failed: %e", errno); #endif /* HAVE_NICE */ } else if (is_cursh) { -- cgit 1.4.1