TIP: Click on subject to list as thread! ANSI
echo: binkd
to: Nick Andre
from: Rob Swindell
date: 2021-01-18 13:35:00
subject: Re: Semaphore

  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
--- SBBSecho 3.12-Linux
                              
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)

SOURCE: echomail via QWK@pharcyde.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.