Yes, yes it will. Set the RLimitCPU setting and try it. Apache's perfectly happy to kill runaway CGI child processes, as it should, since it's running the show
. Doesn't matter of the user clicks a damn thing, the limit is applied regardless, as it ought to be. Servers are ultimately responsible for the maintenance of their children.
Thirty seconds with google shows that IIS will also do this if you tell it, again as it should, since it's running the show
Putting the limit in perl won't solve this problem. If the admins aren't going to enable the limits in the server they're not going to do it for perl programs, so you get nothing. And, from bitter experience, it's pretty clear that leaving it to the client to enforce time limits doesn't work either. (Since making your code do this now takes all of two lines, and isn't entirely reliable in the face of a number of third party libraries anyway)
You've got the wrong solution to your problem, and as such it won't solve the problem. Use the right solution, which you already have.
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.