Thanks for the b0rk3d code!
Fairlight
fairlite at fairlite.com
Tue Feb 20 08:40:05 PST 2018
I'd just like to thank fP-Tech (and the incarnations before them) for the
utterly horrible error-handling code, whereby STDIN is polled as fast as
can be for [Enter], even though it will never come in a cron, CGI, or other
headless context.
I've always contended that this should -at least- use select(), rather than
be a polling loop. Ideally, it should check to see if STDIN is a bad file
descriptor, and simply exit if it is.
However, this egregiously sloppy coding provided a useful solution for a
different issue. I needed to artificially inflate the load average to test
software which will notify me when filePro does exactly this (and other
load-hijacking circumstances). In knowing that fP will jack up the load
average this way, I was able to use the technique to write a load average
stress testing harness which will gracefully ramp the load to a pre-defined
level, without running away with the spoon. I actually needed to emulate
this in a controlled fashion, and the technique works a treat, when used
properly and intentionally.
So, thanks...I think. This is probably the first good thing to ever come
from the debacle that is filePro's polling loop on STDIN.
m->
--
Audio panton, cogito singularis.
More information about the Filepro-list
mailing list