GeezerVison is showing github.com — update · 550cc/linuxKernelRoot@3b6f946
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: testRoot/adb64_helper.cpp +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -105,7 +105,7 @@ pid_t safe_find_adbd_pid(unsigned int root_key) | 105 | 105 |
| 106 | 106 | int status; | 107 | 107 | /* 等待目标进程停止或终止. WUNTRACED - 解释见参考手册 */ | 108 | | - if (waitpid(pid, &status, WUNTRACED) < 0) { return -6; } | | 108 | + if (waitpid(pid, &status, WUNTRACED) < 0 && errno != EACCES) { return -6; } | 109 | 109 |
| 110 | 110 | pid_t ret = -413; | 111 | 111 | read(fd[0], (void*)&ret, sizeof(ret)); | @@ -153,7 +153,7 @@ int safe_kill_adbd_process(unsigned int root_key) { | 153 | 153 |
| 154 | 154 | int status; | 155 | 155 | /* 等待目标进程停止或终止. WUNTRACED - 解释见参考手册 */ | 156 | | - if (waitpid(pid, &status, WUNTRACED) < 0) { return -6; } | | 156 | + if (waitpid(pid, &status, WUNTRACED) < 0 && errno != EACCES) { return -6; } | 157 | 157 |
| 158 | 158 | pid_t ret = -423; | 159 | 159 | read(fd[0], (void*)&ret, sizeof(ret)); | |
Collapse file Copy file name to clipboardExpand all lines: testRoot/fork_helper.h -9Lines changed: 0 additions & 9 deletions Collapse file Copy file name to clipboardExpand all lines: testRoot/su_install_helper.cpp +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -268,7 +268,7 @@ int safe_install_su_tools(unsigned int root_key, const char* base_path, std::str | 268 | 268 |
| 269 | 269 | int status; | 270 | 270 | /* 等待目标进程停止或终止. WUNTRACED - 解释见参考手册 */ | 271 | | - if (waitpid(pid, &status, WUNTRACED) < 0) { return -6; } | | 271 | + if (waitpid(pid, &status, WUNTRACED) < 0 && errno != EACCES) { return -6; } | 272 | 272 |
| 273 | 273 | pid_t ret = -433; | 274 | 274 | read(fd[0], (void*)&ret, sizeof(ret)); | @@ -348,7 +348,7 @@ int safe_uninstall_su_tools(unsigned int root_key, const char* base_path, const | 348 | 348 |
| 349 | 349 | int status; | 350 | 350 | /* 等待目标进程停止或终止. WUNTRACED - 解释见参考手册 */ | 351 | | - if (waitpid(pid, &status, WUNTRACED) < 0) { return -6; } | | 351 | + if (waitpid(pid, &status, WUNTRACED) < 0 && errno != EACCES) { return -6; } | 352 | 352 |
| 353 | 353 | int ret = -522; | 354 | 354 | read(fd[0], (void*)&ret, sizeof(ret)); | |
Collapse file Copy file name to clipboardExpand all lines: testRoot/testRoot.h +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -130,7 +130,7 @@ static int safe_find_all_cmdline_process(unsigned int root_key, const char* targ | 130 | 130 |
| 131 | 131 | int status; | 132 | 132 | /* 等待目标进程停止或终止. WUNTRACED - 解释见参考手册 */ | 133 | | - if (waitpid(pid, &status, WUNTRACED) < 0) { return -6; } | | 133 | + if (waitpid(pid, &status, WUNTRACED) < 0 && errno != EACCES) { return -6; } | 134 | 134 |
| 135 | 135 | int ret = -1002; | 136 | 136 | read(fd[0], (void*)&ret, sizeof(ret)); | @@ -241,7 +241,7 @@ static int safe_wait_and_find_cmdline_process(unsigned int root_key, const char* | 241 | 241 |
| 242 | 242 | int status; | 243 | 243 | /* 等待目标进程停止或终止. WUNTRACED - 解释见参考手册 */ | 244 | | - if (waitpid(pid, &status, WUNTRACED) < 0) { return -6; } | | 244 | + if (waitpid(pid, &status, WUNTRACED) < 0 && errno != EACCES) { return -6; } | 245 | 245 |
| 246 | 246 | int ret = -1002; | 247 | 247 | read(fd[0], (void*)&ret, sizeof(ret)); | |
Collapse file Copy file name to clipboardExpand all lines: testRoot/testRoot.vcxproj -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 89 | 89 | <ItemGroup> | 90 | 90 | <ClInclude Include="adb64_helper.h" /> | 91 | 91 | <ClInclude Include="base64.h" /> | 92 | | - <ClInclude Include="fork_helper.h" /> | 93 | 92 | <ClInclude Include="process64_inject.h" /> | 94 | 93 | <ClInclude Include="maps_helper.h" /> | 95 | 94 | <ClInclude Include="ptrace_arm64_utils.h" /> | |
Collapse file Copy file name to clipboardExpand all lines: testRoot/testRoot.vcxproj.filters -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 30 | 30 | <ClInclude Include="su_install_helper.h" /> | 31 | 31 | <ClInclude Include="kernel_root_helper.h" /> | 32 | 32 | <ClInclude Include="base64.h" /> | 33 | | - <ClInclude Include="fork_helper.h" /> | 34 | 33 | </ItemGroup> | 35 | 34 | </Project> |
|