diff options
| author | Tim J. Robbins <tjr@FreeBSD.org> | 2002-05-10 06:39:16 +0000 |
|---|---|---|
| committer | Tim J. Robbins <tjr@FreeBSD.org> | 2002-05-10 06:39:16 +0000 |
| commit | c17fd4b5cf703d807c93b40288c505055bb344ae (patch) | |
| tree | 94c6f0531681a4a42ca2d3dc97d83d1d0a72e2d7 /usr.bin | |
| parent | fafc7362544055151b94cb4be4cae2463a6d2c4a (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/nice/nice.1 | 18 | ||||
| -rw-r--r-- | usr.bin/nice/nice.c | 2 |
2 files changed, 15 insertions, 5 deletions
diff --git a/usr.bin/nice/nice.1 b/usr.bin/nice/nice.1 index 35a3244ccc7ba..3ed43a32d8e55 100644 --- a/usr.bin/nice/nice.1 +++ b/usr.bin/nice/nice.1 @@ -72,10 +72,6 @@ super-user. Negative numbers are expressed as .Fl - Ns Ar number . .Pp -The returned exit status is the exit value from the -command executed by -.Nm . -.Pp Some shells may provide a builtin .Nm command which is similar or identical to this utility. @@ -96,6 +92,20 @@ Execute command .Sq date at priority -19 assuming the priority of the shell is 0 and you are the super-user. +.Sh DIAGNOSTICS +If +.Ar command +is invoked, the exit status of +.Nm +is the exit status of +.Ar command . +.Pp +An exit status of 126 indicates +.Ar command +was found, but could not be executed. +An exit status of 127 indicates +.Ar command +could not be found. .Sh SEE ALSO .Xr builtin 1 , .Xr csh 1 , diff --git a/usr.bin/nice/nice.c b/usr.bin/nice/nice.c index 52be7621d3de4..d9d91c4a1cfb0 100644 --- a/usr.bin/nice/nice.c +++ b/usr.bin/nice/nice.c @@ -90,7 +90,7 @@ main(argc, argv) if (setpriority(PRIO_PROCESS, 0, niceness)) err(1, "setpriority"); execvp(argv[1], &argv[1]); - err(1, "%s", argv[1]); + err(errno == ENOENT ? 127 : 126, "%s", argv[1]); } void |
