]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
snap
authorFrank Ch. Eigler <fche@redhat.com>
Tue, 9 Dec 2025 00:22:48 +0000 (19:22 -0500)
committerFrank Ch. Eigler <fche@elastic.org>
Tue, 9 Dec 2025 00:22:48 +0000 (19:22 -0500)
src/stackprof.cxx

index 0805abeb6d55c601d4aeeb0ca1a848052603e320..a13f88a471e825c7642f110828701ffa64189b3d 100644 (file)
@@ -294,7 +294,12 @@ main (int argc, char *argv[])
               close (pipefd[1]); // close write end
               char dummy;
               int rc = read (pipefd[0], &dummy, 1); // block until parent is ready
-              assert (rc == 1);              
+             if (rc != 1)
+               {
+                 cerr << "ERROR: child sync read failed"
+                      << ": " << strerror(errno) << endl;
+                 exit(1);
+               }
               close (pipefd[0]);
               execvp (argv[remaining], & argv[remaining] /* not +1: child argv[0] included! */ );
               // notreached unless error