[LEDE-DEV] [PATCH libubox 2/2] uloop: Enable utracing of multi-threaded programs

Michal Sojka sojkam1 at fel.cvut.cz
Tue Sep 12 04:12:32 PDT 2017


This is needed for Linux < 4.7 or < 4.4.13 to report ptrace events in
threads.

Signed-off-by: Michal Sojka <sojkam1 at fel.cvut.cz>
---
 uloop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/uloop.c b/uloop.c
index 3813e18..e6d77df 100644
--- a/uloop.c
+++ b/uloop.c
@@ -369,7 +369,7 @@ static void uloop_handle_processes(void)
 	do_sigchld = false;
 
 	while (1) {
-		pid = waitpid(-1, &ret, WNOHANG);
+		pid = waitpid(-1, &ret, WNOHANG|__WALL);
 		if (pid < 0 && errno == EINTR)
 			continue;
 
-- 
2.14.1




More information about the Lede-dev mailing list