about summary refs log tree commit diff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2009-03-15 01:04:50 +0000
committerWayne Davison <wayned@users.sourceforge.net>2009-03-15 01:04:50 +0000
commitbf25c3a43f79f568b55c45e2701f5c961977b47c (patch)
treeeacd272cd739c11b793aa5788bba21fdc6d1205e /Src/exec.c
parentf0bcd0ecd0896180c5a3f977e086f7237a774d25 (diff)
downloadzsh-bf25c3a43f79f568b55c45e2701f5c961977b47c.tar.gz
zsh-bf25c3a43f79f568b55c45e2701f5c961977b47c.tar.xz
zsh-bf25c3a43f79f568b55c45e2701f5c961977b47c.zip
26735: Check some function return values for failures. Gets rid of
some compiler warnings, and improves error handling/notification.
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c3
1 files changed, 2 insertions, 1 deletions
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) {