ports/62377: strace hangs when running programs from command line
Drazen Kacar
dave at fly.srk.fer.hr
Tue Dec 28 12:30:30 UTC 2004
The following reply was made to PR ports/62377; it has been noted by GNATS.
From: Drazen Kacar <dave at fly.srk.fer.hr>
To: freebsd-gnats-submit at FreeBSD.org, nge at cs.hmc.edu
Cc:
Subject: Re: ports/62377: strace hangs when running programs from command line
Date: Sun, 26 Dec 2004 17:15:21 +0100
--gBBFr7Ir9EOA20Yy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Happened to me too, with 5.2.1 and 5.3. Attached patch fixes the problem.
I didn't test on 4.x systems.
--
.-. .-. Yes, I am an agent of Satan, but my duties are largely
(_ \ / _) ceremonial.
|
| dave at fly.srk.fer.hr
--gBBFr7Ir9EOA20Yy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="strace-4.5.1.diff"
--- strace.c.orig Sun Dec 26 14:49:34 2004
+++ strace.c Sun Dec 26 16:33:21 2004
@@ -539,6 +539,23 @@
cleanup();
exit(1);
}
+#ifdef FREEBSD
+ {
+ int status;
+ pid_t err;
+
+ do {
+ err = waitpid(pid, &status, WUNTRACED);
+ } while (err == -1 && errno == EINTR);
+ if (err == -1) {
+ fprintf(stderr,
+ "waitpid() failed: %s\n",
+ strerror(errno));
+ cleanup();
+ exit(1);
+ }
+ }
+#endif
#ifdef USE_PROCFS
if (proc_open(tcp, 0) < 0) {
fprintf(stderr, "trouble opening proc file\n");
--gBBFr7Ir9EOA20Yy--
More information about the freebsd-ports-bugs
mailing list