Blame SOURCES/strace-rh1573034.patch

a22256
Index: strace-4.12/strace.1
a22256
===================================================================
a22256
--- strace-4.12.orig/strace.1	2016-05-26 17:34:28.000000000 +0200
a22256
+++ strace-4.12/strace.1	2018-04-30 13:08:34.770163287 +0200
a22256
@@ -601,10 +601,13 @@
a22256
 is used.
a22256
 .LP
a22256
 When using
a22256
-.BR \-p ,
a22256
+.B \-p
a22256
+without a
a22256
+.IR command ,
a22256
 the exit status of
a22256
 .B strace
a22256
-is zero unless there was an unexpected error in doing the tracing.
a22256
+is zero unless no processes has been attached or there was an unexpected error
a22256
+in doing the tracing.
a22256
 .SH "SETUID INSTALLATION"
a22256
 If
a22256
 .B strace
a22256
Index: strace-4.12/strace.c
a22256
===================================================================
a22256
--- strace-4.12.orig/strace.c	2018-04-30 13:07:36.776730188 +0200
a22256
+++ strace-4.12/strace.c	2018-04-30 13:08:34.771163277 +0200
a22256
@@ -138,7 +138,7 @@
a22256
 /* Are we "strace PROG" and need to hide everything until execve? */
a22256
 bool hide_log_until_execve = 0;
a22256
 
a22256
-static int exit_code = 0;
a22256
+static int exit_code;
a22256
 static int strace_child = 0;
a22256
 static int strace_tracer_pid = 0;
a22256
 
a22256
@@ -2446,6 +2446,8 @@
a22256
 {
a22256
 	init(argc, argv);
a22256
 
a22256
+	exit_code = !nprocs;
a22256
+
a22256
 	while (trace())
a22256
 		;
a22256