diff options
author | Eugene Syromiatnikov <esyr@redhat.com> | 2017-12-31 18:14:05 +0100 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2019-05-21 23:30:35 +0000 |
commit | 29c4f91a03e3df5a1793b64cb595568dd8fe5f59 (patch) | |
tree | 19377e876f77d3857b708409541f057d300b0eed | |
parent | 5239cc4c6ce852a2383abea302bfa36231230234 (diff) | |
download | strace-29c4f91a03e3df5a1793b64cb595568dd8fe5f59.tar.gz |
strace.c: move argc+daemonized check to tracing_backend_init
This check is also specific to the ptrace tracing backend.
* strace.c (init): Mave !argc && daemonized_tracer check...
(tracing_backend_init): ...here.
-rw-r--r-- | strace.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1626,6 +1626,9 @@ tracing_backend_init(int argc, char *argv[]) if (!nprocs && !argc) error_msg_and_help("must have PROG [ARGS] or -p PID"); + if (!argc && daemonized_tracer) + error_msg_and_help("PROG [ARGS] must be specified with -D"); + if (followfork) ptrace_setoptions |= PTRACE_O_TRACECLONE | PTRACE_O_TRACEFORK | @@ -1837,10 +1840,6 @@ init(int argc, char *argv[]) if (argc < 0) error_msg_and_help("must have command line arguments"); - if (!argc && daemonized_tracer) { - error_msg_and_help("PROG [ARGS] must be specified with -D"); - } - if (optF) { if (followfork) { error_msg("deprecated option -F ignored"); |