aboutsummaryrefslogtreecommitdiff
path: root/miscutils/conspy.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-03-08 21:00:36 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2011-03-08 21:00:36 +0100
commit681efe20d327e9e6774b174a617d66bbb9d21f48 (patch)
tree4331e443ee303c24364b1655651c8584db8b51c1 /miscutils/conspy.c
parent86cf0364bd58e07646a23a1128e4a9ea79189579 (diff)
downloadbusybox-w32-681efe20d327e9e6774b174a617d66bbb9d21f48.tar.gz
busybox-w32-681efe20d327e9e6774b174a617d66bbb9d21f48.tar.bz2
busybox-w32-681efe20d327e9e6774b174a617d66bbb9d21f48.zip
use user's shell instead of hardwired "/bin/sh" (android needs this)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils/conspy.c')
-rw-r--r--miscutils/conspy.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/miscutils/conspy.c b/miscutils/conspy.c
index 1fdb2fb38..9c5405332 100644
--- a/miscutils/conspy.c
+++ b/miscutils/conspy.c
@@ -316,10 +316,8 @@ static NOINLINE void start_shell_in_child(const char* tty_name)
316 int pid = xvfork(); 316 int pid = xvfork();
317 if (pid == 0) { 317 if (pid == 0) {
318 struct termios termchild; 318 struct termios termchild;
319 char *shell = getenv("SHELL"); 319 const char *shell = get_shell_name();
320 320
321 if (!shell)
322 shell = (char *) DEFAULT_SHELL;
323 signal(SIGHUP, SIG_IGN); 321 signal(SIGHUP, SIG_IGN);
324 // set tty as a controlling tty 322 // set tty as a controlling tty
325 setsid(); 323 setsid();