[PATCH v5 2/4] Stage output for -z and -Z options

Dmitry V. Levin ldv at altlinux.org
Thu Jul 4 01:41:01 UTC 2019


On Tue, Jul 02, 2019 at 02:07:15AM +0300, Dmitry V. Levin wrote:
> On Fri, Jun 28, 2019 at 11:34:02AM +0200, Paul Chaignon wrote:
> > -z and -Z options print only successful and failing syscalls respectively.
> > However, failure of syscall is only known after syscall return.  Thus, we
> > end up with something like this on, e.g., ENOENT:
> > 
> >   open("does_not_exist", O_RDONLY <unfinished ...>
> > 
> > whereas the intended result is that the open(...) line is not shown at all.
> > 
> > This patch fixes this issue using open_memstream.  When either the -z or
> > the -Z option is used, the output is staged in memory (using
> > open_memstream) until we know the syscall return status.  If the
> > open_memstream function is not available, these new options error out.
> 
> I have no more comments on 1/4 and 2/4.

Could you also add
Resolves: https://github.com/strace/strace/issues/49
Resolves: https://github.com/strace/strace/issues/50
to the commit message, please?

I think this change as well as -e status=set worth a NEWS entry.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20190704/0dc43e03/attachment.bin>


More information about the Strace-devel mailing list