Subj : Re: Semaphore To : Nick Andre From : Rob Swindell Date : Mon Jan 18 2021 01:35 pm Re: Re: Semaphore By: Nick Andre to Rob Swindell on Mon Jan 18 2021 03:57 pm > On 18 Jan 21 12:31:02, Rob Swindell said the following to Nick Andre: > > RS> Looking at the source code, it appears that BinkD already behaves > RS> exactly a you are requesting it to behave: When it receives SIGBREAK, > RS> SIGINT, or SIGTERM, it sets the 'binkd_exit' global flag and then > RS> terminates when idle that flag is set. > > Nope, it does not appear to function this way on Windows. Set up a test > transaction of a large file just over 300 meg. Close with Taskkill. Active > session closes and notes a failure in the log... not terminating on "idle". > > 20210118 15:53:15 [5884] Remote has 0b of mail and 335278080b of files for > us 20210118 15:53:15 [5884] pwd protected session (MD5) > 20210118 15:53:15 [5884] session in CRYPT mode > 20210118 15:53:15 [5884] receiving X1-240~1.SNA (335278080 byte(s), off 0) > 20210118 15:53:19 [5552] Interrupted by Close > 20210118 15:53:19 [4692] downing servmgr... > 20210118 15:53:19 [5884] done (from 1:229/427@fidonet, failed, S/R: 0/0 (0/0 > bytes)) > 20210118 15:53:19 [5884] receiving of X1-240~1.SNA interrupted at 13475840 > 20210118 15:53:19 [5884] session closed, quitting... Ah, the Windows code has a forked version of that breaksig.c file: https://github.com/pgul/binkd/blob/master/nt/breaksig.c Notice how nothing sets 'binkd_exit' in there? Looks like the deferred exit upon termination was a feature that was added and then never ported to the Windows build of BinkD. A likely fix would be: case CTRL_CLOSE_EVENT: Log (1, "Interrupted by Close"); binkd_exit = TRUE; return TRUE; -- digital man Synchronet "Real Fact" #20: Michael Swindell was directly responsible for Synchronet's commercial success. Norco, CA WX: 78.1øF, 18.0% humidity, 7 mph SE wind, 0.00 inches rain/24hrs .