Blame SOURCES/strace-rh1573034.patch

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