MCPcopy Create free account
hub / github.com/apache/cloudberry / AvoidCorefileGeneration

Function AvoidCorefileGeneration

src/backend/cdb/cdbutil.c:1980–1996  ·  view source on GitHub ↗

* Avoid core file generation for this PANIC. It helps to avoid * filling up disks during tests and also saves time. */

Source from the content-addressed store, hash-verified

1978 * filling up disks during tests and also saves time.
1979 */
1980void
1981AvoidCorefileGeneration()
1982{
1983#if defined(HAVE_GETRLIMIT) && defined(RLIMIT_CORE)
1984 struct rlimit lim;
1985 getrlimit(RLIMIT_CORE, &lim);
1986 lim.rlim_cur = 0;
1987 if (setrlimit(RLIMIT_CORE, &lim) != 0)
1988 {
1989 int save_errno = errno;
1990
1991 elog(NOTICE,
1992 "setrlimit failed for RLIMIT_CORE soft limit to zero. errno: %d (%m).",
1993 save_errno);
1994 }
1995#endif
1996}
1997
1998PG_FUNCTION_INFO_V1(gp_get_suboverflowed_backends);
1999/*

Calls

no outgoing calls

Tested by

no test coverage detected