]> granicus.if.org Git - strace/commitdiff
Treat -ff without -o FILE as single -f
authorDenys Vlasenko <vda.linux@googlemail.com>
Mon, 12 Mar 2012 22:34:13 +0000 (23:34 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 12 Mar 2012 22:34:13 +0000 (23:34 +0100)
* strace.c (init): Treat -ff without -o FILE as single -f.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
strace.c

index e581882a27096f3278ca3c014af89ab6668561a8..27b64b093fd27111a25d912ee9556aefab664296 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -1356,6 +1356,10 @@ init(int argc, char *argv[])
                }
                else if (followfork <= 1)
                        outf = strace_fopen(outfname);
+       } else {
+               /* -ff without -o FILE is the same as single -f */
+               if (followfork > 1)
+                       followfork = 1;
        }
 
        if (!outfname || outfname[0] == '|' || outfname[0] == '!') {