From 681efe20d327e9e6774b174a617d66bbb9d21f48 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 8 Mar 2011 21:00:36 +0100 Subject: use user's shell instead of hardwired "/bin/sh" (android needs this) Signed-off-by: Denys Vlasenko --- miscutils/conspy.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'miscutils/conspy.c') 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) int pid = xvfork(); if (pid == 0) { struct termios termchild; - char *shell = getenv("SHELL"); + const char *shell = get_shell_name(); - if (!shell) - shell = (char *) DEFAULT_SHELL; signal(SIGHUP, SIG_IGN); // set tty as a controlling tty setsid(); -- cgit v1.2.3