diff options
| author | Wolfram Schneider <wosch@FreeBSD.org> | 1997-02-08 22:36:11 +0000 |
|---|---|---|
| committer | Wolfram Schneider <wosch@FreeBSD.org> | 1997-02-08 22:36:11 +0000 |
| commit | a98e5d2939415dd4085f93cfc0e71245fb1f0d26 (patch) | |
| tree | b8c1d3cd5f261b56672e117a7754ac81cc16e074 /gnu | |
| parent | 557330ca5f3a93b4c42f4d29f39d557a997de9e3 (diff) | |
Notes
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/usr.bin/man/lib/util.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gnu/usr.bin/man/lib/util.c b/gnu/usr.bin/man/lib/util.c index 6db023b7368b4..995d318bc530b 100644 --- a/gnu/usr.bin/man/lib/util.c +++ b/gnu/usr.bin/man/lib/util.c @@ -139,6 +139,16 @@ do_system_command (command) else status = system (command); + /* check return value from system() function first */ + if (status == -1) { + fprintf(stderr, + "wait() for exit status of shell failed in function system()\n"); + return 0; + } else if (status == 127 || status == (127 << 8)) { + fprintf(stderr, "execution of the shell failed in function system()\n"); + return 0; + } + if (WIFSIGNALED(status)) return -1; else if (WEXITSTATUS(status)) { |
