]> granicus.if.org Git - procps-ng/commit
all: check stdout and stderr status at exit
authorSami Kerola <kerolasa@iki.fi>
Fri, 23 Mar 2012 12:32:24 +0000 (13:32 +0100)
committerSami Kerola <kerolasa@iki.fi>
Fri, 23 Mar 2012 14:57:53 +0000 (15:57 +0100)
commit52269d22f32b80bff445165ae9166dc5f9626e4b
treeaa6086f215356f6da070bc14e322fcdced99a9c6
parentc7cf98b0e03780f78abe5275c6fb282f71a2369f
all: check stdout and stderr status at exit

If stream status is not checked at the end of execution below problem
would not report error, or non-zero exit code.  The uptime is just an
example same was true with all commands of the project.

$ uptime >&- ; echo $?
uptime: write error: Bad file descriptor
1
$ uptime >/dev/full ; echo $?
uptime: write error: No space left on device
1

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
17 files changed:
Makefile.am
free.c
pgrep.c
pmap.c
ps/Makefile.am
ps/display.c
pwdx.c
skill.c
slabtop.c
sysctl.c
tload.c
top/Makefile.am
top/top.c
uptime.c
vmstat.c
w.c
watch.c