[PATCH] exit/kill ourself with straced child's exitcode/signal

Denys Vlasenko dvlasenk at redhat.com
Wed Sep 24 17:15:05 UTC 2008

On Wed, 2008-09-24 at 18:58 +0200, Denys Vlasenko wrote:
> This patch is intended to implement this RFE:
> https://bugzilla.redhat.com/show_bug.cgi?id=105371
> There are some patches for this, but apparently discussion
> on mailing list died out with no results. At least that bug
> is still open. Moreover, the patches are somewhat buggy.
> I propose this patch.
> I think in real-world usage people do not check strace usage in scripts. They
> just use it correctly, so that it doesn't exit(1) with usage info and whatnot.
> But I know that when I try to debug something by replacing "cmd [args]"
> with "strace cmd [args]" the fact that it's sometimes a problem
> that parent does not see exit code of cmd but sees zero.
> IOW: I do not think that there are users who will be adversely affected by this
> change in behavior. Therefore I do not think adding a switch to enable this is
> worth it. It will be just a case of featuritis.
> Problems this patch fixes compared to previous patches:
> * strace returns exit code of straced process, *never its children*.
> * If child died from a signal, strace will (try to) die from the same signal.
> * strace -p <pid> is not affected (will exit 0 as before).

Now even with patch attached :|

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1.patch
Type: text/x-patch
Size: 1955 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20080924/60a5190c/attachment.bin>

More information about the Strace-devel mailing list