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