summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Syromyatnikov <evgsyr@gmail.com>2017-12-20 16:25:20 +0100
committerDmitry V. Levin <ldv@altlinux.org>2017-12-20 22:58:42 +0000
commitfcf4b6afdc17fb3c3aa9db1fc69640bb468d49c6 (patch)
tree77ae12125c84c2475afaa5f61cb59251a6f84c88
parent61c03be59634819f33ebc84006260b819e67a50e (diff)
downloadstrace-fcf4b6afdc17fb3c3aa9db1fc69640bb468d49c6.tar.gz
strace.c: inform the user about -F option obsolescence
* strace.c (init): Print an error message if the option is used. Co-authored-by: Dmitry V. Levin <ldv@altlinux.org>
-rw-r--r--strace.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/strace.c b/strace.c
index 6fbea45f1..712624518 100644
--- a/strace.c
+++ b/strace.c
@@ -1716,8 +1716,15 @@ init(int argc, char *argv[])
error_msg_and_help("PROG [ARGS] must be specified with -D");
}
- if (!followfork)
- followfork = optF;
+ if (optF) {
+ if (followfork) {
+ error_msg("deprecated option -F ignored");
+ } else {
+ error_msg("option -F is deprecated, "
+ "please use -f instead");
+ followfork = optF;
+ }
+ }
if (followfork >= 2 && cflag) {
error_msg_and_help("(-c or -C) and -ff are mutually exclusive");