rv when execve succeeds...

DJ Delorie dj at redhat.com
Wed Aug 9 17:16:19 UTC 2017


"Dmitry V. Levin" <ldv at altlinux.org> writes:
> Why should we pretend that execve/execveat don't return if they actually
> do return?

If execve() succeeds, the calling image no longer exists... what does it
return *to* ?

The man page even says:

  "execve() does not return on success,"

Hence the philosophical question - does the user *expect* to see "= 0"
in the trace when execve succeeds, or not?  Where in any of the traced
programs is that "= 0" available for inspection?

(the fact that it returns and has a return value when it *fails* is not
in question here)

(and the fact that we *can* find something that *may* be a return value,
is separate from whether or not we *should* print a return value, too)




More information about the Strace-devel mailing list