diff options
author | Richard Lowe <richlowe@richlowe.net> | 2011-03-29 22:27:20 +0000 |
---|---|---|
committer | Richard Lowe <richlowe@richlowe.net> | 2011-03-29 22:27:20 +0000 |
commit | 6a5408e613dc0b372f722907d6c0b18e99c182dd (patch) | |
tree | f24e10b65bbb95c9edb6363c7a526a999c5ad765 /usr/src/lib/libc/port/stdio/popen.c | |
parent | 686c0471389a2f92c1e43b38e1b97771bee482ab (diff) | |
download | illumos-gate-6a5408e613dc0b372f722907d6c0b18e99c182dd.tar.gz |
850 system(3C) and similar could just use /bin/sh
Reviewed by: Gordon Ross <gwr@nexenta.com>
Reviewed by: John Sonnenschein <johns@joyent.com>
Approved by: Garrett D'Amore <garrett@nexenta.com>
Diffstat (limited to 'usr/src/lib/libc/port/stdio/popen.c')
-rw-r--r-- | usr/src/lib/libc/port/stdio/popen.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/usr/src/lib/libc/port/stdio/popen.c b/usr/src/lib/libc/port/stdio/popen.c index b18d29ea93..2a86d36141 100644 --- a/usr/src/lib/libc/port/stdio/popen.c +++ b/usr/src/lib/libc/port/stdio/popen.c @@ -45,6 +45,7 @@ #include <pthread.h> #include <synch.h> #include <spawn.h> +#include <paths.h> #include "stdiom.h" #include "mse.h" #include "libc.h" @@ -95,7 +96,7 @@ popen(const char *cmd, const char *mode) int myside; int yourside; int fd; - const char *shpath; + const char *shpath = _PATH_BSHELL; FILE *iop; int stdio; node_t *curr; @@ -104,8 +105,6 @@ popen(const char *cmd, const char *mode) posix_spawnattr_t attr; posix_spawn_file_actions_t fact; int error; - static const char *sun_path = "/bin/sh"; - static const char *xpg4_path = "/usr/xpg4/bin/sh"; static const char *shell = "sh"; static const char *sh_flg = "-c"; @@ -131,7 +130,6 @@ popen(const char *cmd, const char *mode) return (NULL); } - shpath = __xpg4? xpg4_path : sun_path; if (access(shpath, X_OK)) /* XPG4 Requirement: */ shpath = ""; /* force child to fail immediately */ |