public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jon TURNEY <jturney@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin] Cygwin: testsuite: Don't write coredump in a child which is expected to segfault
Date: Mon, 29 Aug 2022 16:54:31 +0000 (GMT)	[thread overview]
Message-ID: <20220829165431.5AD743858419@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=5cea46d3090fc63b8984530638990231481ef6f7

commit 5cea46d3090fc63b8984530638990231481ef6f7
Author: Jon Turney <jon.turney@dronecode.org.uk>
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/winsup.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 = { 0,0 };
+  setrlimit(RLIMIT_CORE, &nocore);
+
   static struct sigaction act;
   if (argc == 1)
     act.sa_flags = SA_RESETHAND;
@@ -31,6 +34,6 @@ main (int argc, char **argv)
       exit (0x42);
     }
   status &= ~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 == 1 ? !(status == SIGSEGV) : !(status == SIGTERM));
 }

                 reply	other threads:[~2022-08-29 16:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220829165431.5AD743858419@sourceware.org \
    --to=jturney@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).