On Thu, Jul 17, 2008 at 05:25:28PM -0700, Roland McGrath wrote:
> I put this in.

This change unintentionally breaks backwards compatibility:
-fF now means the same as -ff, and my scripts no longer work.

To fix it, I suggest to handle -F option a bit differently.
If -f option is specified, then -F should be ignored, otherwise
any number of specified -F options should be treated as one -f option.

OK to commit?


-- 
ldv
2008-07-24  Dmitry V. Levin <[EMAIL PROTECTED]>

        * strace.c (main): Fix -F option backwards compatibility.

--- strace/strace.c
+++ strace/strace.c
@@ -622,6 +622,7 @@ main(int argc, char *argv[])
        extern char *optarg;
        struct tcb *tcp;
        int c, pid = 0;
+       int optF = 0;
        struct sigaction sa;
 
        static char buf[BUFSIZ];
@@ -660,7 +661,8 @@ main(int argc, char *argv[])
                        debug++;
                        break;
                case 'F':
-                       /* Obsoleted, acts as `-f'.  */
+                       optF = 1;
+                       break;
                case 'f':
                        followfork++;
                        break;
@@ -757,6 +759,9 @@ main(int argc, char *argv[])
        if ((optind == argc) == !pflag_seen)
                usage(stderr, 1);
 
+       if (!followfork)
+               followfork = optF;
+
        if (followfork > 1 && cflag) {
                fprintf(stderr,
                        "%s: -c and -ff are mutually exclusive options\n",

Attachment: pgp2B0G9Oa8Tz.pgp
Description: PGP signature

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to