Received: by mail.netbsd.org (Postfix, from userid 605) id E8B7884D35; Wed, 9 Oct 2019 13:19:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 6BCF084D27 for ; Wed, 9 Oct 2019 13:19:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id s7VG5UHYwFFP for ; Wed, 9 Oct 2019 13:19:44 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 0A4BC84D21 for ; Wed, 9 Oct 2019 13:19:44 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id ECC49FBF4; Wed, 9 Oct 2019 13:19:43 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Wed, 9 Oct 2019 13:19:43 +0000 From: "Kamil Rytarowski" Subject: CVS commit: src/sys To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20191009131943.ECC49FBF4@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Kamil Rytarowski" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: kamil Date: Wed Oct 9 13:19:43 UTC 2019 Modified Files: src/sys/kern: sys_ptrace_common.c src/sys/sys: ptrace.h Log Message: Introduce new ptrace(2) operation PT_STOP It works like: - kill(SIGSTOP) for unstopped tracee - ptrace(PT_CONTINUE,SIGSTOP) for stopped tracee The child will be stopped and always possible to be waited (with wait(2) like calls). For stopped traccee kill(SIGSTOP) has no effect. PT_CONTINUE+SIGSTOP cannot be used on an unstopped process (EBUSY). This operation is modeled after PT_KILL that is similar for the SIGKILL call. While there, allow PT_KILL on unstopped traced child. This operation is useful in an abnormal exit of a debugger from a signal handler, usually followed by waitpid(2) and ptrace(PT_DETACH). To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/kern/sys_ptrace_common.c cvs rdiff -u -r1.65 -r1.66 src/sys/sys/ptrace.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.