]> granicus.if.org Git - strace/commitdiff
Do not suppress signal delivery messages with -qq
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 28 May 2013 20:27:10 +0000 (20:27 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 28 May 2013 21:49:16 +0000 (21:49 +0000)
Current implementation of -qq does not allow suppressing exit status
messages without suppressing signal delivery messages, which is not
good.  There is a traditional "-e signal=none" syntax that can be used
to suppress all signal delivery messages.
This partially reverts commit v4.7-222-g01997cf.

* strace.c (trace): Do not suppress signal delivery messages with -qq.
* strace.1: Update documentation about -qq option.

strace.1
strace.c

index 9d628a1854dd96bce7a5b37caf64b9bc9f23d652..5f287d78dd03b9e3e6145e390195c95a368cd0dc 100644 (file)
--- a/strace.1
+++ b/strace.1
@@ -268,8 +268,7 @@ automatically when output is redirected to a file and the command
 is run directly instead of attaching.
 .TP
 .B \-qq
-If given twice, suppress messages about process exit status and
-signals received.
+If given twice, suppress messages about process exit status.
 .TP
 .B \-r
 Print a relative timestamp upon entry to each system call.  This
index 5b7fbc27bd1a3dd450527853f72f5ce7de288b84..6eab600fc9517ac081da4ec39521380c084d702e 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -2216,8 +2216,9 @@ trace(void)
  show_stopsig:
 #endif
                        if (cflag != CFLAG_ONLY_STATS
-                        && (qual_flags[sig] & QUAL_SIGNAL)
-                       ) {
+                           && !hide_log_until_execve
+                           && (qual_flags[sig] & QUAL_SIGNAL)
+                          ) {
 #if defined(PT_CR_IPSR) && defined(PT_CR_IIP)
                                long pc = 0;
                                long psr = 0;
@@ -2233,19 +2234,17 @@ trace(void)
 # define PC_FORMAT_STR ""
 # define PC_FORMAT_ARG /* nothing */
 #endif
-                               if (qflag < 2 && !hide_log_until_execve) {
-                                       printleader(tcp);
-                                       if (!stopped) {
-                                               tprintf("--- %s ", signame(sig));
-                                               printsiginfo(&si, verbose(tcp));
-                                               tprintf(PC_FORMAT_STR " ---\n"
-                                                       PC_FORMAT_ARG);
-                                       } else
-                                               tprintf("--- stopped by %s" PC_FORMAT_STR " ---\n",
-                                                       signame(sig)
-                                                       PC_FORMAT_ARG);
-                                       line_ended();
-                               }
+                               printleader(tcp);
+                               if (!stopped) {
+                                       tprintf("--- %s ", signame(sig));
+                                       printsiginfo(&si, verbose(tcp));
+                                       tprintf(PC_FORMAT_STR " ---\n"
+                                               PC_FORMAT_ARG);
+                               } else
+                                       tprintf("--- stopped by %s" PC_FORMAT_STR " ---\n",
+                                               signame(sig)
+                                               PC_FORMAT_ARG);
+                               line_ended();
                        }
 
                        if (!stopped)