aboutsummaryrefslogtreecommitdiff
path: root/libbb/execable.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/execable.c')
-rw-r--r--libbb/execable.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libbb/execable.c b/libbb/execable.c
index 5c7ac16a2..82241cd81 100644
--- a/libbb/execable.c
+++ b/libbb/execable.c
@@ -76,3 +76,11 @@ int FAST_FUNC bb_execvp(const char *file, char *const argv[])
76 argv); 76 argv);
77} 77}
78#endif 78#endif
79
80int FAST_FUNC BB_EXECVP_or_die(char **argv)
81{
82 BB_EXECVP(argv[0], argv);
83 /* SUSv3-mandated exit codes */
84 xfunc_error_retval = (errno == ENOENT) ? 127 : 126;
85 bb_perror_msg_and_die("can't execute '%s'", argv[0]);
86}