1From dc73b0e9c6fe235d6e49d8e455dfa17d5a1f9045 Mon Sep 17 00:00:00 2001 2From: Jeffy Chen <jeffy.chen@rock-chips.com> 3Date: Wed, 13 May 2020 15:11:00 +0800 4Subject: [PATCH 17/20] adbd: Specify login shell in standard way 5 6Unlike android's mksh, most of other shells support using '-l' to 7specify login shell. 8 9Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> 10--- 11 core/adbd/services.c | 4 ++-- 12 1 file changed, 2 insertions(+), 2 deletions(-) 13 14diff --git a/core/adbd/services.c b/core/adbd/services.c 15index b4c94cb..239f49f 100644 16--- a/core/adbd/services.c 17+++ b/core/adbd/services.c 18@@ -324,7 +324,7 @@ static int create_subprocess(const char *cmd, const char *arg0, const char *arg1 19 } else { 20 D("adb: unable to open %s\n", text); 21 } 22- execl(cmd, cmd, arg0, arg1, NULL); 23+ execl(cmd, cmd, "-l", arg0, arg1, NULL); 24 fprintf(stderr, "- exec '%s' failed: %s (%d) -\n", 25 cmd, strerror(errno), errno); 26 exit(-1); 27@@ -386,7 +386,7 @@ static int create_subproc_thread(const char *name) 28 if(name) { 29 ret_fd = create_subprocess(SHELL_COMMAND, "-c", name, &pid); 30 } else { 31- ret_fd = create_subprocess(SHELL_COMMAND, "-", 0, &pid); 32+ ret_fd = create_subprocess(SHELL_COMMAND, 0, 0, &pid); 33 } 34 D("create_subprocess() ret_fd=%d pid=%d\n", ret_fd, pid); 35 36-- 372.20.1 38 39