From 6398d2e504c5487ce2d0b4d83fe992f3336ffd74 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Mon, 8 Dec 2025 19:22:48 -0500 Subject: [PATCH] snap --- src/stackprof.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/stackprof.cxx b/src/stackprof.cxx index 0805abeb..a13f88a4 100644 --- a/src/stackprof.cxx +++ b/src/stackprof.cxx @@ -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 -- 2.47.3