Closed kirelagin closed 1 year ago
Yes, agreed. :-)
Would you want to submit a PR changing the first ==
into >=
in that line? Apparently noone noticed for 10 years, so you deserve all the credit. :-)
Credit goes not to me but to another person (who left the company long before I started working here) who fixed this 9 years ago. I only took the time to report the issue 🙂.
It is complicated, so it will be much easier if you just fix it, rather than me going through legal and compliance for one character. (Actually, it is not one character because you'll want to make sure that ft_spawn_secs
is not -1
and also it might or might not make sense to apply the same transformation to ft_spawn_ncalls
(I am not sure if it makes sense for this one)).
The docs could be more explicit, but, still, I think it is pretty clear:
My reading of:
is that after the program runs for 5 seconds, the first time function call, whenever it happens (e.g. after 10 seconds) will trigger the external process. I also think this is the only interpretation that makes sense, given that, in general, it is hard to predict how the execution of a program goes, e.g. it can be preempted for a long time or whatever.
However, the current code will only spawn the process if the function call happens exactly after 5 seconds (to be more precise, any time during the fifth and only fifth second of the execution).
Reproduction:
Expected output:
Actual output: