Date: Mon, 26 Aug 2019 08:06:19 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r351503 - stable/12/tests/sys/kern Message-ID: <201908260806.x7Q86Jcg083525@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Mon Aug 26 08:06:18 2019 New Revision: 351503 URL: https://svnweb.freebsd.org/changeset/base/351503 Log: MFC r351210: sys.kern.pdeathsig.signal_delivered_ptrace: fix debugger detach PR: 237657 Modified: stable/12/tests/sys/kern/pdeathsig.c Directory Properties: stable/12/ (props changed) Modified: stable/12/tests/sys/kern/pdeathsig.c ============================================================================== --- stable/12/tests/sys/kern/pdeathsig.c Mon Aug 26 06:41:17 2019 (r351502) +++ stable/12/tests/sys/kern/pdeathsig.c Mon Aug 26 08:06:18 2019 (r351503) @@ -305,7 +305,9 @@ ATF_TC_BODY(signal_delivered_ptrace, tc) WSTOPSIG(status)); assert(rc == 0); - ptrace(PT_DETACH, c_pid, 0, 0); + waitpid(c_pid, &status, 0); + if (!WIFEXITED(status)) + ptrace(PT_DETACH, c_pid, 0, 0); _exit(0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908260806.x7Q86Jcg083525>