summaryrefslogtreecommitdiff
path: root/usr/src/cmd/env/env.c
diff options
context:
space:
mode:
authorJohn Sonnenschein <johns@joyent.com>2012-05-07 05:39:48 +0000
committerJohn Sonnenschein <johns@joyent.com>2012-05-07 05:39:48 +0000
commitf9b92b874c7e2b0a97203e8b3e370a82027fee42 (patch)
tree5b0afcf9f17c210b1248494d7039b477f403793f /usr/src/cmd/env/env.c
parent99ab767f0b40b10adde1dc9ceaf6bb39d2be5d69 (diff)
parent435bba8aa5d73ccd0b9ec7c79e28bec795904992 (diff)
downloadillumos-joyent-f9b92b874c7e2b0a97203e8b3e370a82027fee42.tar.gz
illumos sync
Diffstat (limited to 'usr/src/cmd/env/env.c')
-rw-r--r--usr/src/cmd/env/env.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr/src/cmd/env/env.c b/usr/src/cmd/env/env.c
index ff2b2c4b31..574c3b43a2 100644
--- a/usr/src/cmd/env/env.c
+++ b/usr/src/cmd/env/env.c
@@ -20,6 +20,9 @@
*/
/*
+ * Copyright (c) 2012, Joyent, Inc. All rights reserved.
+ */
+/*
* Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
*/
@@ -101,7 +104,8 @@ main(int argc, char **argv)
(void) puts(*p++);
} else {
(void) execvp(argv[optind], &argv[optind]);
- (void) perror(argv[0]);
+ (void) fprintf(stderr, "%s: %s: %s\n", argv[0], argv[optind],
+ strerror(errno));
exit(((errno == ENOENT) || (errno == ENOTDIR)) ? 127 : 126);
}
return (0);