[PATCH v3 2/3] The -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:
Dmitry V. Levin
ldv at altlinux.org
Wed May 22 02:10:48 UTC 2019
On Mon, May 13, 2019 at 04:00:31PM +0000, Kohl, Burkhard wrote:
[...]
> > > diff --git a/strace.1.in b/strace.1.in index 76a74119..6ab95836 100644
> > > --- a/strace.1.in
> > > +++ b/strace.1.in
> > > @@ -771,6 +771,13 @@ Print unabbreviated versions of environment, stat, termios, etc.
> > > calls. These structures are very common in calls and so the default
> > > behavior displays a reasonable subset of structure members. Use this
> > > option to get all of the gory details.
> > > +.TP
> > > +.B \-z
> > > +Print successful syscalls only.
> >
> > It might be better to be precise here regarding what we mean by "successful" exactly. Maybe "Print only
> > syscalls that did not return an error code"?
>
> Seems there are 3 possible outcomes for a syscall:
> - zero/successful
> - non-zero/not successful
> - void
>
> As, e.g., exit_group() returns void, it will be filtered by both -z/-Z. Viewed in this context,
> would "successful" be correctly described by "signals success by returning a zero value"?
Syscalls like openat often successfully return non-zero values.
I'd just replaced "successful syscalls" with "successfully returning
syscalls" to exclude syscalls like exit_group that normally do not return.
--
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/20190522/57a089b6/attachment.bin>
More information about the Strace-devel
mailing list