Reputation: 335
I have an apache module written in C, and I would like to limit execution duration of this module to 15 minutes. Is it possible?
Upvotes: 0
Views: 34
Reputation: 229
call the C function time() when module starts-up and store the time in a time_t variable.
Modify all the entry point functions of your C module in order to call time() and verify that are not elapsed 15*60 = 900 seconds.
Return -1 if 900 seconds are elapsed.
Upvotes: 0