]> sourceware.org Git - newlib-cygwin.git/commitdiff
Cygwin: testsuite: Don't write coredump in a child which is expected to segfault
authorJon Turney <jon.turney@dronecode.org.uk>
Sat, 17 Oct 2020 20:47:48 +0000 (21:47 +0100)
committerJon Turney <jon.turney@dronecode.org.uk>
Mon, 29 Aug 2022 16:53:41 +0000 (17:53 +0100)
winsup/testsuite/winsup.api/resethand.c

index 7d58dcd2c3126f3f99a2d9ee8bd20c3d73bd5514..4bd0fa072f00b137dc62fb53176a4a39b925b7e6 100644 (file)
@@ -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));
 }
This page took 0.031333 seconds and 5 git commands to generate.