• feature request - kill binkd by flagfile

    From Torsten Bamberg@2:240/5832 to Alle on Tue Jun 19 02:00:06 2018
    Hello,

    especially on OS/2/EcS/ArcaOS it is common practice, to close all binkd tasks to archive the log-files and cleanup the outbound/inbound directorys.

    If possible, I would like to have a function like this:
    - binkd is running in server mode
    - binkd.pid exists
    - generate a 0 byte file calling binkd.kil at binkd directory
    - all binkd instances going down
    - binkd.pid is deleted


    Like the procedure with BinkleyXE. If I generate a 0 byte File, BinkleyXE is going down after the current call.


    Bye/2 Torsten

    ... MAILBOX01: up 6d 15h 08m load: 33 proc, 128 threads (tbupv1.0)
    --- GoldED+ 1.1.5-17
    * Origin: DatenBahn BBS Hamburg (2:240/5832)
  • From mark lewis@1:3634/12.73 to Torsten Bamberg on Mon Jun 18 23:51:48 2018

    On 2018 Jun 19 02:00:06, you wrote to Alle:

    especially on OS/2/EcS/ArcaOS it is common practice, to close all binkd tasks to archive the log-files and cleanup the outbound/inbound
    directorys.

    i requested disk based semaphores like this a several years ago (10+ IIRC) but was met with strong opposition... why? because binkd originates on *nix and they just don't see the need for these types of semaphores as used on DOS systems...

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... Cats instruct us in the luxurious art of stretching
    ---
    * Origin: (1:3634/12.73)
  • From Torsten Bamberg@2:240/5832 to mark lewis on Tue Jun 19 09:23:06 2018
    Hallo mark!

    18.06.2018 23:51, mark lewis schrieb an Torsten Bamberg:

    i requested disk based semaphores like this a several years ago (10+
    IIRC) but was met with strong opposition... why? because binkd
    originates on *nix and they just don't see the need for these types of semaphores as used on DOS systems...
    Well, the orginal IBM concept of semaphores and pipes is very different compare
    to a file-triggerd shutdown mechanism.
    A semaphore triggerd binkd will be the best possibility, but I know it is very hard to stuck it into the binkd-sourcecode, especially on differnet mechanisms with ArcaOS/Ecomstation/Warp4-3 etc. Also most of the programmers today do not even know about semaphores.

    On unix-systems I've got the control of a running instance by the pid(file) with sysrc. Starting and closing tasks/processes is implemented by default.

    Because of this, a 'simple' daemon exit mechanism for non unix/linux os systems
    might be much easier to implement.


    )\/(ark
    Bye/2 Torsten

    ... MAILBOX01: up 6d 22h 02m load: 34 proc, 130 threads (tbupv1.0)
    --- GoldED+ 1.1.5-17
    * Origin: DatenBahn BBS Hamburg (2:240/5832)
  • From Michael Dukelsky@2:5020/1042 to Torsten Bamberg on Tue Jun 19 11:38:50 2018
    Hello Torsten,

    Tuesday June 19 2018, Torsten Bamberg wrote to Alle:

    especially on OS/2/EcS/ArcaOS it is common practice, to close all
    binkd tasks to archive the log-files and cleanup the outbound/inbound directorys.

    If possible, I would like to have a function like this:
    - binkd is running in server mode
    - binkd.pid exists
    - generate a 0 byte file calling binkd.kil at binkd directory
    - all binkd instances going down
    - binkd.pid is deleted

    It should not be done in binkd, it is a job for a shell script.

    Michael

    ... node (at) f1042 (dot) ru
    --- GoldED+/LNX 1.1.5-b20170303
    * Origin: Moscow, Russia (2:5020/1042)
  • From mark lewis@1:3634/12.73 to Michael Dukelsky on Tue Jun 19 09:31:54 2018
    On 2018 Jun 19 11:38:50, you wrote to Torsten Bamberg:

    It should not be done in binkd, it is a job for a shell script.

    that's what he's trying to do but the cron-executed shell script cannot shut down binkd... that's what the (disk-based) semaphore is for... if we could shut
    down binkd via semaphore, so many mailer related tasks could be automated instead of having to be manually run like now...

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... No, of course I don't mind telling you how to go to hell.
    ---
    * Origin: (1:3634/12.73)
  • From mark lewis@1:3634/12.73 to Michael Dukelsky on Tue Jun 19 09:31:54 2018

    On 2018 Jun 19 11:38:50, you wrote to Torsten Bamberg:

    It should not be done in binkd, it is a job for a shell script.

    that's what he's trying to do but the cron-executed shell script cannot shut down binkd... that's what the (disk-based) semaphore is for... if we could shut
    down binkd via semaphore, so many mailer related tasks could be automated instead of having to be manually run like now...

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... No, of course I don't mind telling you how to go to hell.
    ---
    * Origin: (1:3634/12.73)
  • From Michael Dukelsky@2:5020/1042 to mark lewis on Tue Jun 19 21:06:48 2018
    Hello mark,

    Tuesday June 19 2018, mark lewis wrote to Michael Dukelsky:

    It should not be done in binkd, it is a job for a shell script.

    that's what he's trying to do but the cron-executed shell script
    cannot shut down binkd...

    Why? Isn't it possible to kill a process in OS/2?

    Michael

    ... node (at) f1042 (dot) ru
    --- GoldED+/LNX 1.1.5-b20170303
    * Origin: Moscow, Russia (2:5020/1042)
  • From mark lewis@1:3634/12.73 to Michael Dukelsky on Tue Jun 19 15:12:52 2018

    On 2018 Jun 19 21:06:48, you wrote to me:

    It should not be done in binkd, it is a job for a shell script.

    that's what he's trying to do but the cron-executed shell script
    cannot shut down binkd...

    Why? Isn't it possible to kill a process in OS/2?

    it is possible but not all methods are clean... besides, it is much easier to do something like this in a bat or cmd file...


    rem create the binkdrunning semaphore
    rem>binkdrunning.sem
    binkd -C binkd.conf
    del binkdrunning.sem


    and then in another script...


    rem create the disk-based binkd semaphore
    rem>killbinkd.sem
    :loop
    iff exist binkdrunning.sem then
    sleep 5
    goto /i loop
    endiff
    del killbinkd.sem
    rem now do our log maint
    dobnklog process %YEAR% %MONTHNUM%


    the above would also work in winwhatever as well as a multitasking DOS environment... no special tools needed or wanted... just plain bat scripting...

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... Apparently you aren't supposed to chug Scotch.
    ---
    * Origin: (1:3634/12.73)
  • From Paul Quinn@3:640/384.125 to mark lewis on Wed Jun 20 08:32:17 2018
    Hi! mark,

    On 06/20/2018 05:12 AM, you wrote to Michael Dukelsky:

    binkd -C binkd.conf

    What happens when you _don't_ use an invocation using "-C", and the config file
    gets touched?

    Cheers,
    Paul.

    --- Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
    * Origin: As Socrates once said, "I drank WHAT?" (3:640/384.125)
  • From Tommi Koivula@2:221/360 to Paul Quinn on Wed Jun 20 19:11:22 2018
    On 20.6.2018 1.32, Paul Quinn wrote:

    Hi! mark,

    On 06/20/2018 05:12 AM, you wrote to Michael Dukelsky:

     ml>    binkd -C binkd.conf

    What happens when you _don't_ use an invocation using "-C", and the
    config file gets touched?

    Nothing. Binkd just goes on with the current setup. :)

    'Tommi

    --- Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52
    * Origin: - nntp://rbb.fidonet.fi - Lake Ylo - Finland - (2:221/360)
  • From Michael Dukelsky@2:5020/1042 to mark lewis on Wed Jun 20 19:32:52 2018
    Hello mark,

    Tuesday June 19 2018, mark lewis wrote to Michael Dukelsky:

    It should not be done in binkd, it is a job for a shell script.
    that's what he's trying to do but the cron-executed shell script
    cannot shut down binkd...
    Why? Isn't it possible to kill a process in OS/2?
    it is possible but not all methods are clean...

    It is enough to have one.

    [...skipped...]

    no special tools needed or wanted... just plain bat
    scripting...

    That's what I have said. :)

    Michael

    ... node (at) f1042 (dot) ru
    --- GoldED+/LNX 1.1.5-b20170303
    * Origin: Moscow, Russia (2:5020/1042)
  • From Tommi Koivula@2:221/10 to Torsten Bamberg on Wed Jun 20 20:24:12 2018
    Hi Torsten.

    19 Jun 18 02:00, you wrote to Alle:

    especially on OS/2/EcS/ArcaOS it is common practice, to close all
    binkd tasks to archive the log-files and cleanup the outbound/inbound directorys.

    If possible, I would like to have a function like this:
    - binkd is running in server mode
    - binkd.pid exists
    - generate a 0 byte file calling binkd.kil at binkd directory
    - all binkd instances going down
    - binkd.pid is deleted

    Not the answer to your request, but in my OS/2 system it is possible to rename binkd.log when binkd is running.

    Would be a nice feature, I agree. But I can live without it. ;)

    'Tommi

    ---
    * Origin: ================================================ (2:221/10)
  • From Torsten Bamberg@2:240/5832 to Michael Dukelsky on Wed Jun 20 22:02:16 2018
    Hallo Michael!

    19.06.2018 11:38, Michael Dukelsky schrieb an Torsten Bamberg:

    - all binkd instances going down
    - binkd.pid is deleted
    It should not be done in binkd, it is a job for a shell script.
    Isn't it possible, to expand the 'binkd.exe -t shutdown' like it is common practice at bsd/linux?

    Michael
    Bye/2 Torsten

    ... MAILBOX01: up 8d 11h 07m load: 36 proc, 132 threads (tbupv1.0)
    --- GoldED+ 1.1.5-17
    * Origin: DatenBahn BBS Hamburg (2:240/5832)
  • From mark lewis@1:3634/12.73 to Michael Dukelsky on Wed Jun 20 15:00:42 2018

    On 2018 Jun 20 19:32:52, you wrote to me:

    no special tools needed or wanted... just plain bat scripting...

    That's what I have said. :)

    hehehe... but that way requires an extra and separate tool... kill or pkill or something that can do the job... some are written with EMX and others are written with something else... they don't all work the same... some of them cause problems with other software... if binkd would scan for a few disk-based semaphores, it would work on all OSes equally... it could do this scan at the same time it scans the outbound and all the fileboxes... there could also be a config file option to specify the semaphore directory to look in...

    an additional enhancement that could be very handy and built off of this would be to allow the operator to define semaphores in the config file and have them cause binkd to perform certain tasks... this is similar to what is already available except these would be tied to the defined disk-based semaphore files...

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... 76. In college always sit in the front. You'll stand out immediately. Come gra
    ---
    * Origin: (1:3634/12.73)
  • From Torsten Bamberg@2:240/5832 to Tommi Koivula on Wed Jun 20 22:07:05 2018
    Hallo Tommi!

    20.06.2018 20:24, Tommi Koivula schrieb an Torsten Bamberg:

    Not the answer to your request, but in my OS/2 system it is possible
    to rename binkd.log when binkd is running.
    Would be a nice feature, I agree. But I can live without it. ;)
    Now you can, yes. But if you change your hardware-platform to a very modern multicore one, you will run into the same problems.
    All the tools you are using for shutting down tasks won't work anymore. If you use ECS2/ArcaOS and the ibm-smp-kernel.

    There is only one way, to kill a task properly. You have to use CAD.EXE by hand. cad.exe can't close tasks/programs by batch/rexx/script.

    Because of this, I asked for a possible binkd exit-mechanism, like it is implemented in binkleyXE, a pots mailer. To have a proper exit-mechanism makes it much easier, than have 10/20 tries of a killing-software like pkill.exe, go.exe or kill.exe.


    'Tommi
    Bye/2 Torsten

    ... MAILBOX01: up 8d 11h 07m load: 36 proc, 132 threads (tbupv1.0)
    --- GoldED+ 1.1.5-17
    * Origin: DatenBahn BBS Hamburg (2:240/5832)
  • From Paul Quinn@3:640/384.125 to Tommi Koivula on Thu Jun 21 07:50:29 2018
    Hi! Tommi,

    On 06/21/2018 02:11 AM, you wrote:

    What happens when you _don't_ use an invocation using "-C", and the
    config file gets touched?

    Nothing. Binkd just goes on with the current setup. :)

    Oh, nice. Thanks.

    Cheers,
    Paul.

    --- Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
    * Origin: Some days you're a bug, some days you're a windshield. (3:640/384.125)
  • From Tommi Koivula@2:221/360 to Torsten Bamberg on Thu Jun 21 07:58:58 2018

    20 Jun 18 22:07, you wrote to me:

    20.06.2018 20:24, Tommi Koivula schrieb an Torsten Bamberg:

    Not the answer to your request, but in my OS/2 system it is
    possible to rename binkd.log when binkd is running. Would be a
    nice feature, I agree. But I can live without it. ;)

    Now you can, yes. But if you change your hardware-platform to a very modern multicore one, you will run into the same problems. All the
    tools you are using for shutting down tasks won't work anymore. If you
    use ECS2/ArcaOS and the ibm-smp-kernel.

    Thanks for the explanation, I'll have to remember that if I ever update the hardware. Currently running the last UNI kernel from IBM. (IIRC)

    Because of this, I asked for a possible binkd exit-mechanism, like it
    is implemented in binkleyXE, a pots mailer. To have a proper exit-mechanism makes it much easier, than have 10/20 tries of a killing-software like pkill.exe, go.exe or kill.exe.

    Yes.

    'Tommi

    ---
    * Origin: ================================== (2:221/360)
  • From Michael Dukelsky@2:5020/1042 to Torsten Bamberg on Thu Jun 21 11:13:10 2018
    Hello Torsten,

    Wednesday June 20 2018, Torsten Bamberg wrote to Michael Dukelsky:

    - all binkd instances going down
    - binkd.pid is deleted
    It should not be done in binkd, it is a job for a shell script.
    Isn't it possible, to expand the 'binkd.exe -t shutdown' like it is
    common practice at bsd/linux?

    In fact -t option is in Windows and yes, it would be good to have it in OS/2 too. But it should be implemented by someone who knows programming under OS/2 well.

    Michael

    ... node (at) f1042 (dot) ru
    --- GoldED+/LNX 1.1.5-b20170303
    * Origin: Moscow, Russia (2:5020/1042)
  • From Michael Dukelsky@2:5020/1042 to mark lewis on Thu Jun 21 12:02:52 2018
    Hello mark,

    Wednesday June 20 2018, mark lewis wrote to Michael Dukelsky:

    hehehe... but that way requires an extra and separate tool... kill or pkill or something that can do the job... some are written with EMX
    and others are written with something else... they don't all work the same... some of them cause problems with other software...

    Now I see...

    if binkd
    would scan for a few disk-based semaphores, it would work on all OSes equally... it could do this scan at the same time it scans the
    outbound and all the fileboxes... there could also be a config file
    option to specify the semaphore directory to look in...

    Maybe you are right.

    Michael

    ... node (at) f1042 (dot) ru
    --- GoldED+/LNX 1.1.5-b20170303
    * Origin: Moscow, Russia (2:5020/1042)
  • From Tommi Koivula@2:221/6.6000 to Michael Dukelsky on Thu Jun 21 22:20:06 2018
    Hello, Michael Dukelsky.
    On 21/06/2018 11:13 you wrote:

    Hello Torsten,
    Wednesday June 20 2018, Torsten Bamberg wrote to Michael Dukelsky:
    - all binkd instances going down
    - binkd.pid is deleted
    It should not be done in binkd, it is a job for a shell script.
    Isn't it possible, to expand the 'binkd.exe -t shutdown' like it is
    common practice at bsd/linux?
    In fact -t option is in Windows and yes, it would be good to have it in
    OS/2 too. But it should be implemented by someone who knows programming under OS/2 well.

    -t is used to control the service in windows world. How about if binkd is not running as a service?

    As Torsten requested, checking for a semaphore file might work in every platform. No need for special OS/2 knowledge.

    'Tommi

    --- Hotdoged/2.13.5/Android
    * Origin: point k6000 (2:221/6.6000)