diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-08-24 08:53:26 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2023-05-05 21:21:38 -0500 |
commit | f0920c05b61a24ed13354d30f61e5d99ddffd504 (patch) | |
tree | 467e439026d3889ab349858dc92ee62efb405b86 /src/process | |
parent | b71fc07763390c73af236b62f384674cfd8dde85 (diff) | |
download | musl-f0920c05b61a24ed13354d30f61e5d99ddffd504.tar.gz musl-f0920c05b61a24ed13354d30f61e5d99ddffd504.tar.bz2 musl-f0920c05b61a24ed13354d30f61e5d99ddffd504.tar.xz musl-f0920c05b61a24ed13354d30f61e5d99ddffd504.zip |
system: return 0 if /bin/sh is missing
Diffstat (limited to 'src/process')
-rw-r--r-- | src/process/system.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/process/system.c b/src/process/system.c index 5af59b80..3f61d278 100644 --- a/src/process/system.c +++ b/src/process/system.c @@ -18,7 +18,9 @@ int system(const char *cmd) pthread_testcancel(); - if (!cmd) return 1; + if (!cmd) { + return (access("/bin/sh", X_OK) == 0); + } sigaction(SIGINT, &sa, &oldint); sigaction(SIGQUIT, &sa, &oldquit); |