mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-02 08:46:37 +00:00
Actually define PreventCoreFiles in the sys namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16125 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
387e5ec502
commit
ef6efabd6d
@ -16,13 +16,11 @@
|
|||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
using namespace sys;
|
|
||||||
|
|
||||||
|
|
||||||
// Some LLVM programs such as bugpoint produce core files as a normal part of
|
// Some LLVM programs such as bugpoint produce core files as a normal part of
|
||||||
// their operation. To prevent the disk from filling up, this configuration item
|
// their operation. To prevent the disk from filling up, this configuration item
|
||||||
// does what's necessary to prevent their generation.
|
// does what's necessary to prevent their generation.
|
||||||
void PreventCoreFiles() {
|
void sys::PreventCoreFiles() {
|
||||||
struct rlimit rlim;
|
struct rlimit rlim;
|
||||||
rlim.rlim_cur = rlim.rlim_max = 0;
|
rlim.rlim_cur = rlim.rlim_max = 0;
|
||||||
int res = setrlimit(RLIMIT_CORE, &rlim);
|
int res = setrlimit(RLIMIT_CORE, &rlim);
|
||||||
|
Loading…
Reference in New Issue
Block a user