1
0
Fork 0

Increase RLIMIT_CPU to 12h (from 5mn) in fgfs-construct. I have never witnessed the infinite loop that this limit is supposed to catch - however complex tiles frequently require more than 5 minutes CPU.

This commit is contained in:
Maxime Guillaud 2011-10-18 23:44:06 +02:00 committed by Christian Schmitt
parent f0a5c9ad45
commit f20966c21c

View file

@ -1184,10 +1184,15 @@ int main(int argc, char **argv) {
// cpu time limit since occassionally the triangulator can go into
// an infinite loop.
limit.rlim_cur = 300; // seconds
limit.rlim_max = 300; // seconds
result = setrlimit( RLIMIT_CPU, &limit );
cout << "result of setting mem limit = " << result << endl;
limit.rlim_cur = 43200; // seconds
limit.rlim_max = 43200; // seconds
if (setrlimit( RLIMIT_CPU, &limit )) {
SG_LOG(SG_GENERAL, SG_ALERT, "Error setting RLIMIT_CPU, aborting");
exit(-1);
} else {
cout << "Setting RLIMIT_CPU to " << limit.rlim_cur << " seconds" << endl;
};
#endif // end of stuff that crashes Cygwin
// main construction data management class