diff --git a/pkg/security/tests/syscall_tester/c/syscall_tester.c b/pkg/security/tests/syscall_tester/c/syscall_tester.c index 76844cf222e5c..b7a57b61b55b1 100644 --- a/pkg/security/tests/syscall_tester/c/syscall_tester.c +++ b/pkg/security/tests/syscall_tester/c/syscall_tester.c @@ -188,11 +188,10 @@ int ptrace_traceme() { int ptrace_attach() { int child = fork(); if (child == 0) { - for (int i = 0; i < 20; i++) { - sleep(1); - } + sleep(2); } else { ptrace(PTRACE_ATTACH, child, 0, NULL); + sleep(2); // sleep here to let the agent resolve the pid namespace on procfs wait(NULL); } return EXIT_SUCCESS;