summaryrefslogtreecommitdiffstats
path: root/libc/stdlib/system.c
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2008-07-09 16:47:01 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2008-07-09 16:47:01 +0000
commit62a21af8006ab04282fdc354c5b4dc765f56d058 (patch)
tree568761d58289238aa14cced3f0010809d4d28c00 /libc/stdlib/system.c
parentef250238dc1572caf859c2b64652f9cdfb0d9e42 (diff)
downloaduClibc-alpine-62a21af8006ab04282fdc354c5b4dc765f56d058.tar.bz2
uClibc-alpine-62a21af8006ab04282fdc354c5b4dc765f56d058.tar.xz
BIG BIG commit: all left files merged from trunk [rev 22714]. Currenntly NPTL sh4 port build and work fine. All committed to allow Khem Ray working on a working branch to integrate the ARM nptl port. MIPS nptl port not tested but should still building and working fine. There are some other part non yet merged with trunk (misc/internals and some headers file that need some more work). Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'libc/stdlib/system.c')
-rw-r--r--libc/stdlib/system.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libc/stdlib/system.c b/libc/stdlib/system.c
index d1ff50f51..5b8feacf2 100644
--- a/libc/stdlib/system.c
+++ b/libc/stdlib/system.c
@@ -3,8 +3,6 @@
*
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
-#define SHELL_PATH "/bin/sh" /* Path of the shell. */
-#define SHELL_NAME "sh" /* Name to give it. */
#include <stdio.h>
#include <stddef.h>
@@ -57,7 +55,7 @@ int __libc_system(const char *command)
signal(SIGINT, SIG_DFL);
signal(SIGCHLD, SIG_DFL);
- execl(SHELL_PATH, SHELL_NAME, "-c", command, (char *) 0);
+ execl("/bin/sh", "sh", "-c", command, (char *) 0);
_exit(127);
}
/* Signals are not absolutly guarenteed with vfork */
@@ -180,7 +178,7 @@ do_system (const char *line)
{
/* Child side. */
const char *new_argv[4];
- new_argv[0] = SHELL_NAME;
+ new_argv[0] = "/bin/sh";
new_argv[1] = "-c";
new_argv[2] = line;
new_argv[3] = NULL;
@@ -192,7 +190,7 @@ do_system (const char *line)
INIT_LOCK ();
/* Exec the shell. */
- (void) execve (SHELL_PATH, (char *const *) new_argv, __environ);
+ (void) execve ("/bin/sh", (char *const *) new_argv, __environ);
_exit (127);
}
else if (pid < (pid_t) 0)