4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-19 04:49:25 +08:00

Cygwin: Disable writing core dumps by default.

Change the default core limit from unlimited to 0 (disabled)
This commit is contained in:
Jon Turney 2024-01-09 14:12:31 +00:00
parent 91457377d6
commit b7868e7410
No known key found for this signature in database
GPG Key ID: C7C86F0370285C81
3 changed files with 10 additions and 1 deletions

View File

@ -294,7 +294,7 @@ cygheap_init ()
cygheap->locale.mbtowc = __utf8_mbtowc;
/* Set umask to a sane default. */
cygheap->umask = 022;
cygheap->rlim_core = RLIM_INFINITY;
cygheap->rlim_core = 0;
}
if (!cygheap->fdtab)
cygheap->fdtab.init ();

View File

@ -64,3 +64,6 @@ What changed:
- When RLIMIT_CORE is more than 1MB, a core dump file which can be loaded by gdb
is now written on a fatal error. Otherwise, if it's greater than zero, a text
format .stackdump file is written, as previously.
- The default RLIMIT_CORE is now 0, disabling the generation of core dump or
stackdump files.

View File

@ -103,6 +103,12 @@ is now written on a fatal error. Otherwise, if it's greater than zero, a text
format .stackdump file is written, as previously.
</para></listitem>
<listitem><para>
The default RLIMIT_CORE is now 0, disabling the generation of core dump or
stackdump files. Use e.g. <code>ulimit -c unlimited</code> or <code>ulimit -c
1024</code> to enable them again.
</para></listitem>
</itemizedlist>
</sect2>