From: Dmitry V. L. <ld...@al...> - 2008-09-29 22:21:35
|
On Wed, Sep 24, 2008 at 06:58:05PM +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). I think your idea how to implement this RFE is better than mine, so I'm OK to install your patch with minor cleanup. Objections? -- ldv |