incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Black <abl...@roguewave.com>
Subject Re: [patch] exec utility child process limits (unix)
Date Thu, 14 Sep 2006 20:56:06 GMT
Greetings all.

Attached is a patch that provides a resolution to the to this observed 
problem.  However, other resolutions perhaps would be better.  What this 
patch does is it skips calling setrlimit for a given limit type if 
rlim_cur is RLIM_SAVED_CUR and rlim_max is RLIM_SAVED_MAX (the values 
the rlimit structure was initialized to).

--Andrew Black

Log:
	* cmdopt.cpp (RLIM_INFINITY, RLIM_SAVED_CUR, RLIM_SAVED_MAX): Move 
fallback definitions to...
	* cmdopt.h (RLIM_INFINITY, RLIM_SAVED_CUR, RLIM_SAVED_MAX): ... Here.
	* exec.cpp (limit_process) [!_WIN32 && !_WIN64 && _XOPEN_UNIX]: Check 
limits prior to setting.

Andrew Black wrote:
> Greetings All.
> 
> As a heads up, I am finding that examples may fail to compare correctly 
> (leading to all examples failing) due to errors setting child process 
> limits.  I plan to look into resolving this tomorrow.
> 
> --Andrew Black
> 
> Martin Sebor wrote:
>> Andrew Black wrote:
>>> Revised ChangeLog.
>>
>> Okay. I found a couple of typos in the patch that I missed in
>> my first review so I fixed them myself and committed the whole
>> thing: http://svn.apache.org/viewvc?view=rev&rev=443135
>>
>> Martin
>>
>> Here are the typos in case you're wondering (gcc only issues
>> a warning for them but other compiler might give an error):
>>
>> exec.cpp:
>>
>> @@ -690,7 +690,7 @@
>>          }
>>      }
>>  }
>> -#endif /* _XOPEN_UNIX *//
>> +#endif /* _XOPEN_UNIX */
>>
>>  /**
>>     Entry point to the child process (watchdog) subsystem.
>> @@ -770,7 +770,7 @@
>>
>>  #ifdef _XOPEN_UNIX
>>          limit_process ();
>> -#endif /* _XOPEN_UNIX *//
>> +#endif /* _XOPEN_UNIX */
>>
>>          execv (argv [0], argv);

Mime
View raw message