From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id 5AD743858419; Mon, 29 Aug 2022 16:54:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5AD743858419 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1661792071; bh=1LshC3hiVeuy9uekfjDbQk4ygpEpj9+MYwM69hErrl8=; h=From:To:Subject:Date:From; b=l/cUCkIuJAVnoKgcGnZUzaYzuQVBpHij3w4otG6Nk35fzCUJgrO/EngVBzr4NHpax 56nGIh0upvGWCeMyrDc3jFSzREOJ/FTweaIv1qQa39BA/0QQKLxBgStoMQDKHk1wvb tWiVZbqDz+2V/ufrq5iwYv4exSm0iNee7l/kPrYA= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Jon TURNEY To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: testsuite: Don't write coredump in a child which is expected to segfault X-Act-Checkin: newlib-cygwin X-Git-Author: Jon Turney X-Git-Refname: refs/heads/master X-Git-Oldrev: dcab768cb93e59712af5818736c4de783ae2c612 X-Git-Newrev: 5cea46d3090fc63b8984530638990231481ef6f7 Message-Id: <20220829165431.5AD743858419@sourceware.org> Date: Mon, 29 Aug 2022 16:54:31 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D5cea46d3090= fc63b8984530638990231481ef6f7 commit 5cea46d3090fc63b8984530638990231481ef6f7 Author: Jon Turney Date: Sat Oct 17 21:47:48 2020 +0100 Cygwin: testsuite: Don't write coredump in a child which is expected to= segfault Diff: --- winsup/testsuite/winsup.api/resethand.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/winsup/testsuite/winsup.api/resethand.c b/winsup/testsuite/win= sup.api/resethand.c index 7d58dcd2c..4bd0fa072 100644 --- a/winsup/testsuite/winsup.api/resethand.c +++ b/winsup/testsuite/winsup.api/resethand.c @@ -15,6 +15,9 @@ ouch (int sig) int main (int argc, char **argv) { + static struct rlimit nocore =3D { 0,0 }; + setrlimit(RLIMIT_CORE, &nocore); + static struct sigaction act; if (argc =3D=3D 1) act.sa_flags =3D SA_RESETHAND; @@ -31,6 +34,6 @@ main (int argc, char **argv) exit (0x42); } status &=3D ~0x80; // remove core dump flag - printf ("pid %d exited with status %p\n", pid, (void *) status); + printf ("pid %d exited with status %x\n", pid, status); exit (argc =3D=3D 1 ? !(status =3D=3D SIGSEGV) : !(status =3D=3D SIGTERM= )); }