freebsd-ports/devel/strace/files/patch-strace.c
Philip M. Gollucci 2cc66472a4 Update to 4.5.18
Still i386 only

PR:             ports/129019
Submitted by:   Yi-Jheng Lin <yzlin@cs.nctu.edu.tw>
Approved by:    araujo (mentor, implicit)
2008-12-25 14:44:06 +00:00

26 lines
559 B
C

--- strace.c.orig 2008-08-19 12:47:50.000000000 +0800
+++ strace.c 2008-11-20 22:48:39.000000000 +0800
@@ -604,6 +604,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");