On 4/29/25 3:27 AM, Willem de Bruijn wrote: > Reviewed-by: Willem de Bruijn <[email protected]> > > Jakub Kicinski wrote: >> On Sat, 26 Apr 2025 11:15:34 -0400 Willem de Bruijn wrote: >>>> @@ -193,6 +198,19 @@ KSFT_DISRUPTIVE = True >>>> return env >>>> >>>> >>>> +term_cnt = 0 >>>> + >>> >>> A bit ugly to initialize this here. Also, it already is initialized >>> below. >> >> We need a global so that the signal handler can access it. >> Python doesn't have syntax to define a variable without a value. >> Or do you suggest term_cnt = None ? > > I meant that the "global term_cnt" in ksft_run below already creates > the global var, and is guaranteed to do so before _ksft_intr, so no > need to also define it outside a function. > > Obviously not very important, don't mean to ask for a respin. LGTM.
FWIW I think it's better to avoid the unneeded assignment in global scope, so I would suggest either follow-up or a v2, whatever is simpler. Thanks, Paolo
