Skip to content

Commit 3b6f946

Browse files
committed
update
1 parent 8fe1ed8 commit 3b6f946

File tree

6 files changed

+6
-17
lines changed

6 files changed

+6
-17
lines changed

testRoot/adb64_helper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ pid_t safe_find_adbd_pid(unsigned int root_key)
105105

106106
int status;
107107
/* 等待目标进程停止或终止. WUNTRACED - 解释见参考手册 */
108-
if (waitpid(pid, &status, WUNTRACED) < 0) { return -6; }
108+
if (waitpid(pid, &status, WUNTRACED) < 0 && errno != EACCES) { return -6; }
109109

110110
pid_t ret = -413;
111111
read(fd[0], (void*)&ret, sizeof(ret));
@@ -153,7 +153,7 @@ int safe_kill_adbd_process(unsigned int root_key) {
153153

154154
int status;
155155
/* 等待目标进程停止或终止. WUNTRACED - 解释见参考手册 */
156-
if (waitpid(pid, &status, WUNTRACED) < 0) { return -6; }
156+
if (waitpid(pid, &status, WUNTRACED) < 0 && errno != EACCES) { return -6; }
157157

158158
pid_t ret = -423;
159159
read(fd[0], (void*)&ret, sizeof(ret));

testRoot/fork_helper.h

Lines changed: 0 additions & 9 deletions
This file was deleted.

testRoot/su_install_helper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ int safe_install_su_tools(unsigned int root_key, const char* base_path, std::str
268268

269269
int status;
270270
/* 等待目标进程停止或终止. WUNTRACED - 解释见参考手册 */
271-
if (waitpid(pid, &status, WUNTRACED) < 0) { return -6; }
271+
if (waitpid(pid, &status, WUNTRACED) < 0 && errno != EACCES) { return -6; }
272272

273273
pid_t ret = -433;
274274
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
348348

349349
int status;
350350
/* 等待目标进程停止或终止. WUNTRACED - 解释见参考手册 */
351-
if (waitpid(pid, &status, WUNTRACED) < 0) { return -6; }
351+
if (waitpid(pid, &status, WUNTRACED) < 0 && errno != EACCES) { return -6; }
352352

353353
int ret = -522;
354354
read(fd[0], (void*)&ret, sizeof(ret));

testRoot/testRoot.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ static int safe_find_all_cmdline_process(unsigned int root_key, const char* targ
130130

131131
int status;
132132
/* 等待目标进程停止或终止. WUNTRACED - 解释见参考手册 */
133-
if (waitpid(pid, &status, WUNTRACED) < 0) { return -6; }
133+
if (waitpid(pid, &status, WUNTRACED) < 0 && errno != EACCES) { return -6; }
134134

135135
int ret = -1002;
136136
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*
241241

242242
int status;
243243
/* 等待目标进程停止或终止. WUNTRACED - 解释见参考手册 */
244-
if (waitpid(pid, &status, WUNTRACED) < 0) { return -6; }
244+
if (waitpid(pid, &status, WUNTRACED) < 0 && errno != EACCES) { return -6; }
245245

246246
int ret = -1002;
247247
read(fd[0], (void*)&ret, sizeof(ret));

testRoot/testRoot.vcxproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
<ItemGroup>
9090
<ClInclude Include="adb64_helper.h" />
9191
<ClInclude Include="base64.h" />
92-
<ClInclude Include="fork_helper.h" />
9392
<ClInclude Include="process64_inject.h" />
9493
<ClInclude Include="maps_helper.h" />
9594
<ClInclude Include="ptrace_arm64_utils.h" />

testRoot/testRoot.vcxproj.filters

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,5 @@
3030
<ClInclude Include="su_install_helper.h" />
3131
<ClInclude Include="kernel_root_helper.h" />
3232
<ClInclude Include="base64.h" />
33-
<ClInclude Include="fork_helper.h" />
3433
</ItemGroup>
3534
</Project>

0 commit comments

Comments
 (0)