Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2020-10-17 23:47:48 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2022-08-29 19:53:41 +0300
commit5cea46d3090fc63b8984530638990231481ef6f7 (patch)
tree49e94eb2cd53a15b696e893667258144825acb5c /winsup/testsuite
parentdcab768cb93e59712af5818736c4de783ae2c612 (diff)
Cygwin: testsuite: Don't write coredump in a child which is expected to segfault
Diffstat (limited to 'winsup/testsuite')
-rw-r--r--winsup/testsuite/winsup.api/resethand.c5
1 files changed, 4 insertions, 1 deletions
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));
}