• Semaphore

    From Marc Lewis@1:396/45 to All on Sun Jan 17 09:20:03 2021
    Hello All.

    Is it possible to code in (in a future release) a mechanism to make binkd exit (shut down) by seeing a semaphore in a given directory? Internet Rex had this, when it saw "REXEXIT.NOW" in the semaphore directory.

    ....Otherwise, binkd (for OS/2) works like an absolute champ.

    Best regards,
    Marc

    --- timEd/2 1.10.y2k+
    * Origin: Sursum Corda! BBS-Huntsville,AL-bbs.sursum-corda.com (1:396/45)
  • From Wilfred van Velzen@2:280/464 to Marc Lewis on Sun Jan 17 16:54:11 2021
    Hi Marc,

    On 2021-01-17 09:20:03, you wrote to All:

    Is it possible to code in (in a future release) a mechanism to make
    binkd exit (shut down) by seeing a semaphore in a given directory? Internet Rex had this, when it saw "REXEXIT.NOW" in the semaphore directory.

    I'm wondering why you would need that?

    And doesn't OS2 have a way to kill running software? In linux you can 'kill' it by PID or program name, so you don't need a semaphore file for this kind of mechanism...

    Bye, Wilfred.

    --- FMail-lnx64 2.1.0.18-B20170815
    * Origin: FMail development HQ (2:280/464)
  • From Vincent Coen@2:250/1 to Wilfred van Velzen on Sun Jan 17 16:54:50 2021
    Hello Wilfred!

    Sunday January 17 2021 16:54, you wrote to Marc Lewis:

    Hi Marc,

    On 2021-01-17 09:20:03, you wrote to All:

    Is it possible to code in (in a future release) a mechanism to
    make binkd exit (shut down) by seeing a semaphore in a given
    directory? Internet Rex had this, when it saw "REXEXIT.NOW" in
    the semaphore directory.

    I'm wondering why you would need that?

    And doesn't OS2 have a way to kill running software? In linux you can
    'kill' it by PID or program name, so you don't need a semaphore file
    for this kind of mechanism...

    There is a difference for terminate and kill even more so for multi
    user platforms.


    Vincent

    --- Mageia Linux v7.1 X64/Mbse v1.0.7.17/GoldED+/LNX 1.1.5-b20180707
    * Origin: Air Applewood, The Linux Gateway to the UK & Eire (2:250/1)
  • From Nick Andre@1:229/426 to Wilfred Van Velzen on Sun Jan 17 12:50:49 2021
    On 17 Jan 21 16:54:11, Wilfred Van Velzen said the following to Marc Lewis:

    Is it possible to code in (in a future release) a mechanism to make binkd exit (shut down) by seeing a semaphore in a given directory? Internet Rex had this, when it saw "REXEXIT.NOW" in the semaphore directory.

    I'm wondering why you would need that?

    I asked for the same thing over the years. I'm wondering why the arrogance insist that we kill things by Pid instead of telling the program to exit gracefully. The program checks for modifcations to the config file; it could easily just check for a dummy file and close up shop.

    And doesn't OS2 have a way to kill running software? In linux you can
    'kill
    it by PID or program name, so you don't need a semaphore file for this
    kind
    mechanism...

    When your beloved Linux needs to shut down, why does it not just immediately signal the system to power off? Why does it get busy terminating services?

    Nick

    --- Renegade vY2Ka2
    * Origin: Joey, do you like movies about gladiators? (1:229/426)
  • From Tommi Koivula@2:221/1 to Wilfred van Velzen on Sun Jan 17 20:05:38 2021

    17 Jan 21 16:54, Wilfred van Velzen wrote to Marc Lewis:

    On 2021-01-17 09:20:03, you wrote to All:

    Is it possible to code in (in a future release) a mechanism to make
    binkd exit (shut down) by seeing a semaphore in a given directory?
    Internet Rex had this, when it saw "REXEXIT.NOW" in the semaphore
    directory.

    I'm wondering why you would need that?

    To stop mail transfer? :)

    And doesn't OS2 have a way to kill running software?

    Yes, it has.

    'Tommi

    ---
    * Origin: rbb.fidonet.fi (2:221/1)
  • From Tommi Koivula@2:221/1 to Nick Andre on Sun Jan 17 20:07:26 2021

    17 Jan 21 12:50, Nick Andre wrote to Wilfred Van Velzen:

    Is it possible to code in (in a future release) a mechanism to make
    binkd exit (shut down) by seeing a semaphore in a given directory?
    Internet Rex had this, when it saw "REXEXIT.NOW" in the semaphore
    directory.

    I'm wondering why you would need that?

    I asked for the same thing over the years. I'm wondering why the
    arrogance
    insist that we kill things by Pid instead of telling the program to exit gracefully.

    Maybe "to kill" is a bit wrong. Terminating a program with PID is "to ask to stop".

    === Cut ===
    17 Jan 20:11:39 [40589] BEGIN, binkd/1.1a-111/OS2 -sC -vv binkd_360.cfg
    17 Jan 20:11:39 [40589] created binkd_360.pid
    17 Jan 20:11:39 [40589] servmgr started
    - 17 Jan 20:11:39 [40589] servmgr listen on *:24555
    ! 17 Jan 20:11:57 [40589] got signal #15.
    17 Jan 20:11:57 [40589] Closing server socket # 3
    17 Jan 20:11:57 [40589] bsy_remove_all: done
    17 Jan 20:11:57 [40589] unlinked `binkd_360.pid'
    === Cut ===

    'Tommi

    ---
    * Origin: rbb.fidonet.fi (2:221/1)
  • From Nick Andre@1:229/426 to Tommi Koivula on Sun Jan 17 13:29:31 2021
    On 17 Jan 21 20:07:26, Tommi Koivula said the following to Nick Andre:

    I asked for the same thing over the years. I'm wondering why the
    arrog
    insist that we kill things by Pid instead of telling the program to
    ex
    gracefully.

    Maybe "to kill" is a bit wrong. Terminating a program with PID is "to ask stop".

    I know what it means and those of us who asked for a shutdown-semaphore
    want slightly different behavior than terminating with Pid.

    On typical Fido mailers, you create an exit semaphore so the mailer sees that and exits with an errorlevel set once the current mail session has ended. On BinkD (on Windows) telling it to close terminates active connections.

    This has been requested here a few times.

    Nick

    --- Renegade vY2Ka2
    * Origin: Joey, do you like movies about gladiators? (1:229/426)
  • From Marc Lewis@1:396/45 to Wilfred van Velzen on Sun Jan 17 14:35:47 2021
    Hello Wilfred.

    <On 17Jan2021 16:54 Wilfred van Velzen (2:280/464) wrote a message to Marc Lewis regarding Re: Semaphore >

    Is it possible to code in (in a future release) a mechanism to make
    binkd exit (shut down) by seeing a semaphore in a given directory? Internet Rex had this, when it saw "REXEXIT.NOW" in the semaphore directory.

    I'm wondering why you would need that?

    And doesn't OS2 have a way to kill running software? In linux you
    can 'kill' it by PID or program name, so you don't need a
    semaphore file for this kind of mechanism...

    I'll do some command digging and see; there probably IS a type of 'kill' command built into OS/2 that I've never utilised.

    Best regards,
    Marc

    ... !Updating Windows - - DO NOT TURN ON YOUR COMPUTER.
    --- timEd/2 1.10.y2k+
    * Origin: Sursum Corda! BBS-Huntsville,AL-bbs.sursum-corda.com (1:396/45)
  • From Rob Swindell@1:103/705 to Nick Andre on Sun Jan 17 12:41:01 2021
    Re: Re: Semaphore
    By: Nick Andre to Wilfred Van Velzen on Sun Jan 17 2021 12:50 pm

    And doesn't OS2 have a way to kill running software? In linux you can 'kill it by PID or program name, so you don't need a semaphore file for this kind mechanism...

    When your beloved Linux needs to shut down, why does it not just
    immediately
    signal the system to power off? Why does it get busy terminating services?

    Programs can handle signals (e.g. SIGTERM) gracefully. This is pretty standard for *nix programs and BinkD is no exception. This is what the exitsig() function in binkd's breaksig.c already does.
    --
    digital man

    Synchronet/BBS Terminology Definition #18:
    DCD = Data Carrier Detect
    Norco, CA WX: 64.1F, 29.0% humidity, 2 mph SW wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nick Andre@1:229/426 to Rob Swindell on Sun Jan 17 15:46:52 2021
    On 17 Jan 21 12:41:01, Rob Swindell said the following to Nick Andre:

    When your beloved Linux needs to shut down, why does it not just
    immediately
    signal the system to power off? Why does it get busy terminating services?

    Programs can handle signals (e.g. SIGTERM) gracefully. This is pretty
    stand
    for *nix programs and BinkD is no exception. This is what the exitsig() function in binkd's breaksig.c already does.

    Yes... I already know this. Thats not what was requested here a few times over the years. Read my other message. Dialup/legacy/other mailers wait until the current session is done before exiting when receiving an exit semaphore.

    Nick

    --- Renegade vY2Ka2
    * Origin: Joey, do you like movies about gladiators? (1:229/426)
  • From Rob Swindell@1:103/705 to Nick Andre on Sun Jan 17 13:37:37 2021
    Re: Re: Semaphore
    By: Nick Andre to Rob Swindell on Sun Jan 17 2021 03:46 pm

    On 17 Jan 21 12:41:01, Rob Swindell said the following to Nick Andre:

    When your beloved Linux needs to shut down, why does it not just immediately signal the system to power off? Why does it get busy terminating services?

    Programs can handle signals (e.g. SIGTERM) gracefully. This is pretty stand for *nix programs and BinkD is no exception. This is what the exitsig() function in binkd's breaksig.c already does.

    Yes... I already know this. Thats not what was requested here a few times over the years. Read my other message. Dialup/legacy/other mailers wait until the current session is done before exiting when receiving an exit semaphore.

    Okay, so you're wanting a change in the behavior of the termination signal handling. That seems different than expecting the use of a file to signal the termination.

    There are many standard signals and BinkD is treating 3 of them the same (SIGBREAK, SIGINT, and SIGTERM). It doesn't seem like it would be hard to change the behavior of one or all of those (or add support for another signal) to terminate in the fashion you're requesting. Without the use of a file.
    --
    digital man

    Sling Blade quote #12:
    Karl (re hammer): I don't rightly know. I just kinda woke up holding it.
    Norco, CA WX: 64.1F, 29.0% humidity, 2 mph SW wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nick Andre@1:229/426 to Rob Swindell on Sun Jan 17 18:27:00 2021
    On 17 Jan 21 13:37:37, Rob Swindell said the following to Nick Andre:

    Okay, so you're wanting a change in the behavior of the termination signal handling. That seems different than expecting the use of a file to signal termination.

    Nope.

    What was asked was an additional check for a simple dummy file when BinkD ***is idle*** and terminates if that file exists.

    I prefer to have all connections finish before BinkD shuts down.... letting the door close gently via a dummy file rather than slamming it shut with Pid.

    Just like every Fidonet mailer does so.

    Nick

    --- Renegade vY2Ka2
    * Origin: Joey, do you like movies about gladiators? (1:229/426)
  • From Rob Swindell@1:103/705 to Nick Andre on Sun Jan 17 18:42:46 2021
    Re: Re: Semaphore
    By: Nick Andre to Rob Swindell on Sun Jan 17 2021 06:27 pm

    On 17 Jan 21 13:37:37, Rob Swindell said the following to Nick Andre:

    Okay, so you're wanting a change in the behavior of the termination
    signal handling. That seems different than expecting the
    use of a file to signal t termination.

    Nope.

    What was asked was an additional check for a simple dummy file when BinkD
    ***is idle*** and terminates if that file exists.

    I prefer to have all connections finish before BinkD shuts down.... letting
    the door close gently via a dummy file rather than
    slamming it shut with Pid.

    Yeah, you're not understanding what I'm saying. BinkD could pretty easily set a flag when it receives a signal (whatever signal, it doesn't have to be SIGTERM) and then terminate ***when idle**. It sounds like you're opposed to the use of a signal for some reasson.

    Just like every Fidonet mailer does so.

    BinkIT is a FidoNet mailer and does not behave as you describe.
    --
    digital man

    This Is Spinal Tap quote #33:
    Nigel Tufnel: Well, so what? What's wrong with bein' sexy?
    Norco, CA WX: 73.3F, 16.0% humidity, 0 mph SSW wind, 0.00 inches rain/24hrs --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Dan Cross@3:770/100 to Rob Swindell on Mon Jan 18 15:48:57 2021
    On 17 Jan 2021 at 01:37p, Rob Swindell pondered and said...

    There are many standard signals and BinkD is treating 3 of them the same (SIGBREAK, SIGINT, and SIGTERM). It doesn't seem like it would be hard to change the behavior of one or all of those (or add support for another signal) to terminate in the fashion you're requesting. Without the use
    of a file.

    I nominate "SIGQUIT". The use of a file seems like
    an unnecessary DOS-ism.

    --- Mystic BBS v1.12 A46 2020/08/26 (Windows/32)
    * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (3:770/100)
  • From Rob Swindell@1:103/705 to Dan Cross on Sun Jan 17 20:09:06 2021
    Re: Re: Semaphore
    By: Dan Cross to Rob Swindell on Mon Jan 18 2021 03:48 pm

    On 17 Jan 2021 at 01:37p, Rob Swindell pondered and said...

    There are many standard signals and BinkD is treating 3 of them the same (SIGBREAK, SIGINT, and SIGTERM). It doesn't seem like it would be hard to change the behavior of one or all of those (or add support for another signal) to terminate in the fashion you're requesting. Without the use
    of a file.

    I nominate "SIGQUIT".

    SIGQUIT normally triggers a core dump (the default "action" if no signal handler is installed). Probably not the best choice for the proposed use case.

    The use of a file seems like an unnecessary DOS-ism.

    Yup. That's what I was trying to say. :-)
    --
    digital man

    This Is Spinal Tap quote #18:
    Sustain, listen to it. Don't hear anything. You would though were it playing. Norco, CA WX: 67.7F, 20.0% humidity, 0 mph SSW wind, 0.00 inches rain/24hrs --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Richard Menedetter@2:310/31 to Nick Andre on Mon Jan 18 10:33:20 2021
    Hi Nick!

    17 Jan 2021 18:27, from Nick Andre -> Rob Swindell:

    What was asked was an additional check for a simple dummy file when
    BinkD ***is idle*** and terminates if that file exists.

    BinkD is open source.
    Anybody can implement stuff, or pay somebody to implement stuff.

    I assume that for some people it sounds very strange to implement an exit file semaphore in 2021.
    So they don't do it, as they do not see any benefit in it.

    I prefer to have all connections finish before BinkD shuts down....

    Then don't send BinkD SIGKILL, take some other signal.
    I assume SIGTERM will wait until ongoing calls are finished.
    SIGTERM is the polite request of the OS to please quit when it suitable for you.
    SIGKILL is a yo're fired now..

    I have not checked how BinkD reacts to SIGTERM

    letting the door close gently via a dummy file rather than slamming it shut with Pid.

    There are MANY SIGNALS!!!!!
    Only one "slams the door shut".
    Do not use SIGKILL if you do not mean to kill the process.
    In case there is nothing that suits you, you can use SIGUSR1 or SIGUSR2. (behaviour needs to be implemented in BinkD then)

    CU, Ricsi

    ... Bigamy is having one wife too many. Monogamy is the same. -Oscar Wilde
    --- GoldED+/LNX
    * Origin: He who laughs, lasts. (2:310/31)
  • From Oli@2:280/464.47 to Marc Lewis on Mon Jan 18 10:51:50 2021
    Marc wrote (2021-01-17):

    Hello All.

    Is it possible to code in (in a future release) a mechanism to make binkd exit (shut down) by seeing a semaphore in a given directory? Internet Rex had this, when it saw "REXEXIT.NOW" in the semaphore directory.

    Since binkd already scans the file system for changes, is cross-platform and has ftrans to map file path (e.g. for a mounted remote fs), it makes sense to use a semaphore for this.

    ---
    * Origin: this message must NOT be gated to Telegram (2:280/464.47)
  • From Oli@2:280/464.47 to Richard Menedetter on Mon Jan 18 11:04:15 2021
    Richard wrote (2021-01-18):

    I assume that for some people it sounds very strange to implement an exit file semaphore in 2021.

    I didn't know that anyone has implemented any new feature in the last couple of years.

    So they don't do it, as they do not see any benefit in it.

    Who are they? And why do they see no benefit in anything? ;)

    ---
    * Origin: this message must NOT be gated to Telegram (2:280/464.47)
  • From Richard Menedetter@2:310/31 to Oli on Mon Jan 18 11:06:54 2021
    Hi Oli!

    18 Jan 2021 11:04, from Oli -> Richard Menedetter:

    I assume that for some people it sounds very strange to implement
    an exit file semaphore in 2021.
    I didn't know that anyone has implemented any new feature in the last couple of years.

    I do not know that either ;)

    So they don't do it, as they do not see any benefit in it.
    Who are they?

    I don't know.
    But if nobody is left, than it makes little sense to me to discuss implementation details, that are expected to be implemented by people who do not exist any longer here in the echo.

    So either nobody is left, or the people that are left feel it is a bad idea.
    In both cases discussing the implementation details is pointless ;)

    CU, Ricsi

    ... Murphy's Law is recursive. Washing your car to make it rain doesn't work. --- GoldED+/LNX
    * Origin: Hire a consultant - you'll have someone to blame. (2:310/31)
  • From Tommi Koivula@2:221/1.1 to Marc Lewis on Mon Jan 18 12:13:18 2021
    Hi Marc.

    17 Jan 21 14:35:46, you wrote to Wilfred van Velzen:

    Is it possible to code in (in a future release) a mechanism to make
    binkd exit (shut down) by seeing a semaphore in a given directory?
    Internet Rex had this, when it saw "REXEXIT.NOW" in the semaphore
    directory.

    I'm wondering why you would need that?

    And doesn't OS2 have a way to kill running software? In linux you
    can 'kill' it by PID or program name, so you don't need a
    semaphore file for this kind of mechanism...

    I'll do some command digging and see; there probably IS a type of 'kill'
    command built into OS/2 that
    I've never utilised.

    There is an old but nice Go!

    === Cut ===
    GO! v1.5 - (c) 1993-95 by Carsten Wimmer <cawim@train.oche.de>

    Usage: go <command> [argument]

    Available commands:

    -pl Process List <default> -k Kill a Process
    -lpl Process List with Paths -ka Kill all Instances
    -tl Thread List -cp Check for a Process
    -sl Semaphore List -j Jump to a Process
    -sm Shared Memory -at Application Type
    -ml Module List -ut Machine Uptime
    -mt Module Dependency Tree -df Free Space on Drives

    -lh Long, detailed Help
    -la GO! License Agreement
    === Cut ===

    'Tommi

    ---
    * Origin: IPv6 Point at [2001:470:1f15:cb0:2:221:1:1] (2:221/1.1)
  • From Nick Andre@1:229/426 to Rob Swindell on Mon Jan 18 05:20:12 2021
    On 17 Jan 21 18:42:46, Rob Swindell said the following to Nick Andre:

    Yeah, you're not understanding what I'm saying. BinkD could pretty easily a flag when it receives a signal (whatever signal, it doesn't have to be SIGTERM) and then terminate ***when idle**. It sounds like you're opposed the use of a signal for some reasson.

    Yeah, I'm not opposed to signals. Its not that difficult to understand the intention of the request. This is a very busy Hub system where I'd like to schedule maintainence when BinkD twiddles its thumbs. Whether thats done with semaphore files or signals doesn't matter to me. If someone shows me how to accomplish my request on Windows then wonderful... that person gets simple kudos and the echo goes back to crickets chirping.

    That said, traditional or legacy mailers on DOS, Windows and OS/2 have always reacted to semaphore files. My software, Frontdoor, Intermail, TBBS/Flame,
    etc. as well as Internet Rex. What I "don't understand" is the apparent visceral reaction by some to have that same simple level of functionality as the rest. The mere suggestion just gets everyone's rulers out to measure how big their Linux egos are.

    Its been running here for many years trouble-free... its not the end of the world if it can't do one little thing. Any further discussion or quote-rants or whatever silly symantecs and we have to cough up royalties to Mark Lewis.

    Nick

    --- Renegade vY2Ka2
    * Origin: Joey, do you like movies about gladiators? (1:229/426)
  • From Nick Andre@1:229/426 to Richard Menedetter on Mon Jan 18 05:23:02 2021
    On 18 Jan 21 10:33:20, Richard Menedetter said the following to Nick Andre:

    I have not checked how BinkD reacts to SIGTERM

    As explained - Myself and others have a specific need to have BinkD shutdown when its idle. As in, after all connections finish up. I really don't care at the end of the day if that is accomplished with a semaphore file or other means so long as it does things exactly in the way that was being described.

    letting the door close gently via a dummy file rather than slamming
    it
    shut with Pid.

    There are MANY SIGNALS!!!!!

    BinkD runs excellent on this Windows system for long periods of uptime unattended without any babysitting. If the initial request can be done, I'm all ears. If it cannot, then life goes on. Its not the end of the world.

    If I wasn't happy with it, I wouldn't be using it. Calm down, have some dip.

    Nick

    --- Renegade vY2Ka2
    * Origin: Joey, do you like movies about gladiators? (1:229/426)
  • From Oli@2:280/464.47 to Nick Andre on Mon Jan 18 12:47:19 2021
    Nick wrote (2021-01-18):

    What I "don't understand" is the apparent
    visceral reaction by some to have that same simple level of functionality as the rest. The mere suggestion just gets everyone's rulers out to measure how big their Linux egos are.

    DOSism bad!
    POSIXism good!
    ;)

    I wonder in which way signals are better in contrast to a semaphore from a usability / user's perspective? Yes, signals are useful, but in this specific case? What's wrong with a semaphore (besides that it's not hip in 2021)?

    ---
    * Origin: this message must NOT be gated to Telegram (2:280/464.47)
  • From Nick Andre@1:229/426 to Oli on Mon Jan 18 06:56:37 2021
    On 18 Jan 21 12:47:19, Oli said the following to Nick Andre:

    I wonder in which way signals are better in contrast to a semaphore from a usability / user's perspective? Yes, signals are useful, but in this
    specifi
    case? What's wrong with a semaphore (besides that it's not hip in 2021)?

    I have yet to have that simple question answered to me logically, politely, step-by-step without someone bragging about the size of their Linux penis.

    If the goalposts don't get moved after that, then we go back to the strawman game of "Its open source, add the feature yourself".

    I think I'll use that line whenever I encounter a Linux guy who can't make a piece of hardware work correctly as it does on Windows.

    Nick

    --- Renegade vY2Ka2
    * Origin: Joey, do you like movies about gladiators? (1:229/426)
  • From Richard Menedetter@2:310/31 to Nick Andre on Mon Jan 18 14:35:48 2021
    Hi Nick!

    18 Jan 2021 05:23, from Nick Andre -> Richard Menedetter:

    If the initial request can be done, I'm all ears. If it cannot, then
    life goes on. Its not the end of the world.

    I think that it would be quit easy to implement.
    But until now nobody volunteered to implement it ...
    (either because they are not reading this echo, or because they do not like the way to do it, or .....)

    So to me it currently does not look like somebody would implement this ... Sorry.

    CU, Ricsi

    ... When in doubt, predict that the present trend will continue.
    --- GoldED+/LNX
    * Origin: If you can't laugh at yourself, I'll laugh at you. (2:310/31)
  • From Dan Cross@3:770/100 to Rob Swindell on Tue Jan 19 02:55:33 2021
    On 17 Jan 2021 at 08:09p, Rob Swindell pondered and said...

    I nominate "SIGQUIT".

    SIGQUIT normally triggers a core dump (the default "action" if no signal handler is installed). Probably not the best choice for the proposed use case.

    Indeed, but since you're overriding the default action with a custom
    signal handler anyway, why not?

    Yup. That's what I was trying to say. :-)

    And I agree with you. :-)

    --- Mystic BBS v1.12 A46 2020/08/26 (Windows/32)
    * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (3:770/100)
  • From Richard Menedetter@2:310/31 to Nick Andre on Mon Jan 18 14:41:04 2021
    Hi Nick!

    18 Jan 2021 06:56, from Nick Andre -> Oli:

    If the goalposts don't get moved after that, then we go back to the strawman game of "Its open source, add the feature yourself".

    It is quit simple, you have an idea that you like, or a feature that you think is useful.
    You either "sell" it to someone that says, hey that is useful, I will implement it, or implement it yourself, or pay somebody to implement it, or live without it.

    I would tell you more about signal handling in Windows.
    Except I have no clue of it.

    Google says this, but I guess it is not very helpful: https://www.bsc.es/support/LSF/old-9.1.1/lsf_programmer/index.htm?signals_windo ws_lsf.html~main

    So sorry ... I cannot help you.

    And I assume the number of people working on the BinkD Source here is quite small, and the number of people not busy with other tasks is even smaller.

    I think you can have perl hooks in binkd.
    But it might be that those can only be used to react to incoming files.
    Never used them ... but it might be worth looking into it.

    It might be that the Linux subsystem of windows has a signal implementation. But the first google serach hints that the Microsoft implementation is buggy: https://stackoverflow.com/questions/49292180/bash-on-ubuntu-on-windows-signal-h andler-does-not-work

    CU, Ricsi

    ... I have an electric knife. The turkey is unarmed. I will eventually win.
    --- GoldED+/LNX
    * Origin: We should take from the past its fires, not its ashes. (2:310/31)
  • From Dan Cross@3:770/100 to Oli on Tue Jan 19 03:11:47 2021
    On 18 Jan 2021 at 12:47p, Oli pondered and said...

    I wonder in which way signals are better in contrast to a semaphore from
    a usability / user's perspective? Yes, signals are useful, but in this specific case? What's wrong with a semaphore (besides that it's not hip
    in 2021)?

    A couple of things, but the biggest one I can think of is fragility
    in the face of system crashes. In particular, who's responsible for
    cleaning this file up? Should `binkd` delete it as part of gracefully
    exiting? What happens if the file exists when `binkd` restarts?
    That is, even if `binkd` is responsible for deleting the file, it's
    possible that the system may crash in between it being created and
    `binkd` cleaning it up, so `binkd` may observe the presence of the
    file when it next starts up again. Should it delete it, or refuse
    to continue running?

    Generally speaking, the use of a "semaphore" file (what a terrible
    name) conflates the concept of issuing a control operation to some
    long-running process (which is precisely what things like signals
    are for) with the persistence of data provided by a filesystem.
    But processes are by their nature ephemeral: they only have meaning
    while running. Once they've stopped running, that's it; there's
    no mechanism to continue controlling them. It muddies things and
    unnecessarily widens the design space (forcing one to confront issues
    like the above) for no apparent reason other than that's what someone suggested.

    It's clear from context that what the OP _really_ wants is just some
    mechanism to signal `binkd` that it should gracefully exit once it's
    done processing its current queue of work for existing connections;
    implicit in this, it should _also_ deny new incoming connections and
    refrain from making new outgoing connections. In other words, it
    should lame-duck and quiesce itself and then exit. That's fine, and
    seems reasonable. The issue is that the request for enhancement didn't
    say _that_, instead, it was written in terms of using this file-based
    mechanism for signaling, when a perfectly good signaling mechanism
    already exists and is implemented almost everywhere.

    Synchronizing on files as a poor-man's IPC mechanism seems strange
    when the system provides any number of existing IPC mechanisms one
    can use instead. In particular, signals were invented for
    precisely this kind of signaling.

    --- Mystic BBS v1.12 A46 2020/08/26 (Windows/32)
    * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (3:770/100)
  • From Dallas Hinton@1:153/7715 to Dan Cross on Mon Jan 18 08:34:24 2021
    Hi, Dan -- on Jan 19 2021 at 03:11, you wrote:

    A couple of things, but the biggest one I can think of is fragility
    in the face of system crashes. In particular, who's responsible for cleaning this file up? Should `binkd` delete it as part of gracefully

    FWIW, I have a batch file that runs on startup and deletes all semaphore flags.
    They're all in the same directory so it's easy.

    If I have to close iRex, that startup batch also deletes the semaphores.


    Cheers... Dallas

    --- timEd/NT 1.30+
    * Origin: The BandMaster, Vancouver, CANADA (1:153/7715)
  • From Dumas Walker@1:2320/105 to NICK ANDRE on Mon Jan 18 13:57:00 2021
    Yeah, I'm not opposed to signals. Its not that difficult to understand the intention of the request. This is a very busy Hub system where I'd like to schedule maintainence when BinkD twiddles its thumbs. Whether thats done
    with
    semaphore files or signals doesn't matter to me. If someone shows me how to accomplish my request on Windows then wonderful... that person gets simple kudos and the echo goes back to crickets chirping.

    I would do it if I knew how.

    Mike


    * SLMR 2.1a * "Stamp Collection?? Ha-Ha!" - Nelson
    --- SBBSecho 3.12-Linux
    * Origin: capitolcityonline.net * Telnet/SSH:2022/HTTP (1:2320/105)
  • From Rob Swindell@1:103/705 to Nick Andre on Mon Jan 18 12:06:52 2021
    Re: Re: Semaphore
    By: Nick Andre to Rob Swindell on Mon Jan 18 2021 05:20 am

    On 17 Jan 21 18:42:46, Rob Swindell said the following to Nick Andre:

    Yeah, you're not understanding what I'm saying. BinkD could pretty easily s a flag when it receives a signal (whatever signal, it doesn't have to be SIGTERM) and then terminate ***when idle**. It sounds like you're opposed t the use of a signal for some reasson.

    Yeah, I'm not opposed to signals.

    Ah, it seemed like you were.

    Its not that difficult to understand the
    intention of the request. This is a very busy Hub system where I'd like to schedule maintainence when BinkD twiddles its thumbs. Whether thats done with semaphore files or signals doesn't matter to me. If someone shows me how to accomplish my request on Windows then wonderful... that person gets simple kudos and the echo goes back to crickets chirping.

    https://www.computerhope.com/taskkill.htm

    That said, traditional or legacy mailers on DOS, Windows and OS/2 have always reacted to semaphore files. My software, Frontdoor, Intermail, TBBS/Flame,
    etc. as well as Internet Rex. What I "don't understand" is the apparent visceral reaction by some to have that same simple level of functionality
    as
    the rest. The mere suggestion just gets everyone's rulers out to measure
    how
    big their Linux egos are.

    No, I think it's more a question of choosing a better design. Polling a file system for a file's existence is heavy-handed and slow; do it frequent enough and you'll create an observable impact on the performance of the system. Handling a signal on the other hand adds no system or application performance overhead - it's like an interrupt, there's no polling (and definitely no disk or file system access) involved.

    That said, BSO mailers obviously have to poll the file system frequently anyway since that's just how they work, so adding yet-another-file to check for wouldn't likely make much difference. It's just another less than ideal design tacked on top of another less than ideal design.

    Its been running here for many years trouble-free... its not the end of the world if it can't do one little thing. Any further discussion or
    quote-rants
    or whatever silly symantecs and we have to cough up royalties to Mark
    Lewis.

    It wouldn't be a big change to binkd and it's open source. Try addig it (starting with breaksig.c), if you need help, just ask.
    --
    digital man

    Sling Blade quote #21:
    Karl: Coffee makes me nervous when I drink it. Mmm.
    Norco, CA WX: 76.8F, 18.0% humidity, 9 mph SSE wind, 0.00 inches rain/24hrs --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Nick Andre on Mon Jan 18 12:31:02 2021
    Re: Re: Semaphore
    By: Rob Swindell to Nick Andre on Mon Jan 18 2021 12:06 pm

    Its been running here for many years trouble-free... its not the end of the world if it can't do one little thing. Any further discussion or quote-rants or whatever silly symantecs and we have to cough up
    royalties
    to Mark Lewis.

    It wouldn't be a big change to binkd and it's open source. Try addig it (starting with breaksig.c), if you need help, just ask.

    Looking at the source code, it appears that BinkD already behaves exactly as you are requesting it to behave: When it receives SIGBREAK, SIGINT, or SIGTERM, it sets the 'binkd_exit' global flag and then terminates when idle if that flag is set.
    --
    digital man

    Synchronet "Real Fact" #56:
    Synchronet Terminal Server introduced SecureShell (SSH) support w/v3.14a (2006).
    Norco, CA WX: 77.0F, 18.0% humidity, 0 mph ESE wind, 0.00 inches rain/24hrs --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nick Andre@1:229/426 to Rob Swindell on Mon Jan 18 15:25:09 2021
    On 18 Jan 21 12:06:52, Rob Swindell said the following to Nick Andre:

    https://www.computerhope.com/taskkill.htm

    Already tried that. Kills BinkD and all active connections.

    Nick

    --- Renegade vY2Ka2
    * Origin: Joey, do you like movies about gladiators? (1:229/426)
  • From Rob Swindell@1:103/705 to Nick Andre on Mon Jan 18 12:54:55 2021
    Re: Re: Semaphore
    By: Nick Andre to Rob Swindell on Mon Jan 18 2021 03:25 pm

    On 18 Jan 21 12:06:52, Rob Swindell said the following to Nick Andre:

    https://www.computerhope.com/taskkill.htm

    Already tried that. Kills BinkD and all active connections.

    Does BinkD log the "got signal" message?

    Here's the relevant code:
    https://github.com/pgul/binkd/blob/master/breaksig.c
    --
    digital man

    Synchronet/BBS Terminology Definition #2:
    ARS = Access Requirement Strings
    Norco, CA WX: 77.6F, 18.0% humidity, 6 mph ESE wind, 0.00 inches rain/24hrs --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Dan Cross@3:770/100 to Dallas Hinton on Tue Jan 19 09:56:27 2021
    On 18 Jan 2021 at 08:34a, Dallas Hinton pondered and said...

    Hi, Dan -- on Jan 19 2021 at 03:11, you wrote:

    A couple of things, but the biggest one I can think of is fragility
    in the face of system crashes. In particular, who's responsible for cleaning this file up? Should `binkd` delete it as part of
    gracefully

    FWIW, I have a batch file that runs on startup and deletes all semaphore flags. They're all in the same directory so it's easy.

    Yeah, that's _a_ design, but doesn't really address the
    question. The program author still has to make some kind
    of design decision about what to do if the file exists
    when the program starts up (suppose someone starts it
    directly, without running the script that deletes the files
    ahead of time?).

    More generally, the issue in this discussion is that the
    request for a feature has been wrapped up in details about
    the implementation of that feature. From my observation,
    that's the central source of friction.

    --- Mystic BBS v1.12 A46 2020/08/26 (Windows/32)
    * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (3:770/100)
  • From Nick Andre@1:229/426 to Rob Swindell on Mon Jan 18 15:57:04 2021
    On 18 Jan 21 12:31:02, Rob Swindell said the following to Nick Andre:

    Looking at the source code, it appears that BinkD already behaves exactly you are requesting it to behave: When it receives SIGBREAK, SIGINT, or SIGTERM, it sets the 'binkd_exit' global flag and then 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...

    Nick

    --- Renegade vY2Ka2
    * Origin: Joey, do you like movies about gladiators? (1:229/426)
  • From Rob Swindell@1:103/705 to Nick Andre on Mon Jan 18 13:35:32 2021
    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:

    Looking at the source code, it appears that BinkD already behaves exactly a you are requesting it to behave: When it receives SIGBREAK, SIGINT, or SIGTERM, it sets the 'binkd_exit' global flag and then 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.1F, 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)
  • From Nick Andre@1:229/426 to Dan Cross on Mon Jan 18 16:33:45 2021
    On 19 Jan 21 09:56:27, Dan Cross said the following to Dallas Hinton:

    More generally, the issue in this discussion is that the
    request for a feature has been wrapped up in details about
    the implementation of that feature. From my observation,
    that's the central source of friction.

    I cannot believe I actually agree with Oli about something but he is 100% correct that its likely because the request is DOS-ish and not Posix-ish.

    The use of signals I can and have clearly demonstrated that it works differently on Windows. I believe Rob when he tells me the logic is there, he may be correct but BinkD on Windows drops all active connections when signalled. If someone can demonstrate a way to fulfill the request, wonderful.

    I don't buy that argument of introducing another level of complexity because the BinkD code is already doing a fair amount of checking for files such as the config, FLO, HLD etc. Checking for a dummy file cannot be much of a stretch to put in there. Its a silly program that sends silly Fido packets; its not some mission-critical airline reservation system.

    Anyhow its not the end of the world if it can't be done but the reactions to this simple request from Sysops over the years are almost always negative from a certain OS crowd.

    Nick

    --- Renegade vY2Ka2
    * Origin: Joey, do you like movies about gladiators? (1:229/426)
  • From Dallas Hinton@1:153/7715 to Dan Cross on Mon Jan 18 14:00:12 2021
    Hi, Dan -- on Jan 19 2021 at 09:56, you wrote:

    Yeah, that's _a_ design, but doesn't really address the
    question. The program author still has to make some kind
    of design decision about what to do if the file exists


    More generally, the issue in this discussion is that the
    request for a feature has been wrapped up in details about
    the implementation of that feature. From my observation,
    that's the central source of friction.

    Certainly can be -- I'd like to see a semaphore age option...but my solution is
    easier to implement! :-)


    Cheers... Dallas

    --- timEd/NT 1.30+
    * Origin: The BandMaster, Vancouver, CANADA (1:153/7715)
  • From Rob Swindell@1:103/705 to Nick Andre on Mon Jan 18 14:14:42 2021
    Re: Re: Semaphore
    By: Nick Andre to Dan Cross on Mon Jan 18 2021 04:33 pm

    On 19 Jan 21 09:56:27, Dan Cross said the following to Dallas Hinton:

    More generally, the issue in this discussion is that the
    request for a feature has been wrapped up in details about
    the implementation of that feature. From my observation,
    that's the central source of friction.

    I cannot believe I actually agree with Oli about something but he is 100% correct that its likely because the request is DOS-ish and not Posix-ish.

    The use of signals I can and have clearly demonstrated that it works differently on Windows. I believe Rob when he tells me the logic is there, he may be correct but BinkD on Windows drops all active connections when signalled. If someone can demonstrate a way to fulfill the request, wonderful.

    Try this:
    ftp://vert.synchro.net/main/bbs/binkd.exe

    You can see the (2 line) code change here: https://github.com/rswindell/binkd/commit/68baf454683688b52890ab3ce9e9f403

    If it works as you wish, I'll submit a PR to pgul's repo.

    I don't buy that argument of introducing another level of complexity
    because
    the BinkD code is already doing a fair amount of checking for files such as the config, FLO, HLD etc. Checking for a dummy file cannot be much of a stretch to put in there. Its a silly program that sends silly Fido packets; its not some mission-critical airline reservation system.

    BinkD is a unixy program and semaphore files are just not the Unixy-way (for a lot of good reasons). The *nix build of BinkD already behaves in the way you requested, so perhaps that added to the confusion. Or maybe the primary contributors aren't actively following this echo.

    Anyhow its not the end of the world if it can't be done but the reactions
    to
    this simple request from Sysops over the years are almost always negative from a certain OS crowd.

    Huh.
    --
    digital man

    Sling Blade quote #5:
    Karl Childers (to father): You ought not killed my little brother...
    Norco, CA WX: 78.1F, 19.0% humidity, 4 mph SE wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Dan Cross@3:770/100 to Nick Andre on Tue Jan 19 12:23:10 2021
    On 18 Jan 2021 at 04:33p, Nick Andre pondered and said...

    I cannot believe I actually agree with Oli about something but he is
    100% correct that its likely because the request is DOS-ish and not Posix-ish.

    I dunno. Do you care about the feature or how the feature is
    implemented? Seems like the former is more important than the
    latter. I've tried pretty hard to be respectful here; but I'm
    just an old-time Unix person. *shrug*

    --- Mystic BBS v1.12 A46 2020/08/26 (Windows/32)
    * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (3:770/100)
  • From Richard Menedetter@2:310/31 to Nick Andre on Tue Jan 19 00:28:00 2021
    Hi Nick!

    18 Jan 2021 15:57, from Nick Andre -> Rob Swindell:

    Nope, it does not appear to function this way on Windows.

    Maybe try with something easier.
    Try to send it a SUGHUP (hangup signal).
    Upon receiving that it should reload the config:

    ricsi@menedetter:~$ killall binkd -s HUP
    ricsi@menedetter:~$ tail fido/log/binkd.log
    + 19 Jan 00:22:23 [8432] got SIGHUP
    + 19 Jan 00:22:23 [8432] Reloading configuration..

    CU, Ricsi

    ... When in danger, when in doubt, run in circles, yell and shout.
    --- GoldED+/LNX
    * Origin: Canada & America - Separated by a common language! (2:310/31)
  • From Nick Andre@1:229/426 to Dan Cross on Mon Jan 18 18:29:33 2021
    On 19 Jan 21 12:23:10, Dan Cross said the following to Nick Andre:

    I cannot believe I actually agree with Oli about something but he is 100% correct that its likely because the request is DOS-ish and not Posix-ish.

    I dunno. Do you care about the feature or how the feature is
    implemented? Seems like the former is more important than the

    Not really. I care that the feature works. Rob appears to of found the problem in the code.

    Nick

    --- Renegade vY2Ka2
    * Origin: Joey, do you like movies about gladiators? (1:229/426)
  • From Richard Menedetter@2:310/31 to Rob Swindell on Tue Jan 19 00:34:14 2021
    Hi Rob!

    18 Jan 2021 14:14, from Rob Swindell -> Nick Andre:

    You can see the (2 line) code change here: https://github.com/rswindell/binkd/commit/68baf454683688b52890ab3ce9e9 f403

    Great!
    Would it be possible to push that into the official repo?

    CU, Ricsi

    ... Beware of buying things if the manuals are bigger than the equipment.
    --- GoldED+/LNX
    * Origin: Stqtistics: numbers looking for an argument. (2:310/31)
  • From Dan Cross@3:770/100 to Nick Andre on Tue Jan 19 12:45:51 2021
    On 18 Jan 2021 at 06:29p, Nick Andre pondered and said...

    Not really. I care that the feature works. Rob appears to of found the problem in the code.

    Problem solved. Yay!

    --- Mystic BBS v1.12 A46 2020/08/26 (Windows/32)
    * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (3:770/100)
  • From Rob Swindell@1:103/705 to Richard Menedetter on Mon Jan 18 16:28:58 2021
    Re: Semaphore
    By: Richard Menedetter to Rob Swindell on Tue Jan 19 2021 12:34 am

    Hi Rob!

    18 Jan 2021 14:14, from Rob Swindell -> Nick Andre:

    You can see the (2 line) code change here: https://github.com/rswindell/binkd/commit/68baf454683688b52890ab3ce9e9 f403

    Great!
    Would it be possible to push that into the official repo?

    If someone can confirm it works as desired (I don't actually use binkd any longer), I'll submit the pull request to the official repo.
    --
    digital man

    Synchronet "Real Fact" #5:
    Synchronet version 3 for Win32 development began in 1999.
    Norco, CA WX: 75.3F, 19.0% humidity, 4 mph SE wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nick Andre@1:229/426 to Rob Swindell on Mon Jan 18 19:33:53 2021
    On 18 Jan 21 16:28:58, Rob Swindell said the following to Richard Menedetter:

    Great!
    Would it be possible to push that into the official repo?

    If someone can confirm it works as desired (I don't actually use binkd any longer), I'll submit the pull request to the official repo.

    I'll try to confirm this by sometime tomorrow. Thank you.

    Nick

    --- Renegade vY2Ka2
    * Origin: Joey, do you like movies about gladiators? (1:229/426)
  • From Richard Menedetter@2:310/31 to Rob Swindell on Tue Jan 19 15:59:56 2021
    Hi Rob!

    18 Jan 2021 16:28, from Rob Swindell -> Richard Menedetter:

    Would it be possible to push that into the official repo?
    If someone can confirm it works as desired (I don't actually use binkd
    any longer), I'll submit the pull request to the official repo.

    Much appreciated!

    CU, Ricsi

    ... In summer its too hot to do the job that it was too cold for in winter.
    --- GoldED+/LNX
    * Origin: Give the game away! (2:310/31)
  • From Tony Langdon@3:633/410 to Nick Andre on Wed Jan 20 11:30:00 2021
    On 01-17-21 12:50, Nick Andre wrote to Wilfred Van Velzen <=-

    I asked for the same thing over the years. I'm wondering why the
    arrogance insist that we kill things by Pid instead of telling the
    program to exit gracefully. The program checks for modifcations to the config file; it could easily just check for a dummy file and close up shop.

    "kill" by default sends a SIGTERM to the process, which tells it to shut down gracefully. At least on a *NIX OS.


    ... Don't itch for what you don't intend to scratch.
    === MultiMail/Win v0.52
    --- SBBSecho 3.10-Linux
    * Origin: Freeway BBS Bendigo,Australia freeway.apana.org.au (3:633/410)