qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] linux-user: Show SIGCHLD in clone() strace output


From: Helge Deller
Subject: Re: [PATCH 1/2] linux-user: Show SIGCHLD in clone() strace output
Date: Wed, 25 Jan 2023 15:18:43 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0

On 1/25/23 14:57, Helge Deller wrote:
When stracing a program, show up the SIGCHLD value the same
way as it's done when running strace natively, e.g.:
clone(child_stack=0xf7af0040, flags=CLONE_VM|CLONE_VFORK|SIGCHLD, ...

Signed-off-by: Helge Deller <deller@gmx.de>
---
  linux-user/strace.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/linux-user/strace.c b/linux-user/strace.c
index 82dc1a1e20..3157e4b420 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -1136,6 +1136,7 @@ UNUSED static struct flags clone_flags[] = {
  #if defined(CLONE_IO)
      FLAG_GENERIC(CLONE_IO),
  #endif
+    FLAG_TARGET(SIGCHLD),

It's actually not 100% correct, as this would trigger for other SIGxxx values 
too,
which have the same bits set as TARGET_SIGCHLD. Given the fact that we only 
support
TARGET_SIGCHLD in clone(), it would nevertheless in most cases show the correct 
output.

So, probably it's best to not apply this patch it as-is.

Helge



reply via email to

[Prev in Thread] Current Thread [Next in Thread]