• Can't Control-C during a file search

    From Eric Oulashin@1:103/705 to GitLab note in main/sbbs on Sat Oct 7 14:07:13 2023
    https://gitlab.synchro.net/main/sbbs/-/issues/638#note_4287

    @rswindell I'm at a loss on this. I don't know what ddfilelister would need to do (that it's not currently doing) to allow Ctrl-C to abort a file search.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Tue Oct 10 14:42:45 2023
    https://gitlab.synchro.net/main/sbbs/-/issues/638#note_4316

    I do plan to look more into this, create a test case and help to determine what's going with this issue.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Wed Oct 25 09:27:30 2023
    https://gitlab.synchro.net/main/sbbs/-/issues/638#note_4373

    I found that with both "find text" and "search filename" if I hold down ctrl-c then it'll abort pretty quickly.

    Also, I get a [press a key] after each group and rather then CTRL-C aborting at that point, it takes it as just a key press. Not sure if that helps.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Eric Oulashin@1:103/705 to GitLab note in main/sbbs on Fri Nov 10 10:36:50 2023
    https://gitlab.synchro.net/main/sbbs/-/issues/638#note_4453

    Recently, I remember nelgin saying he seemed to be able to stop it on his BBS after pressing Ctrl-C several times. It seems it doesn't stop on my BBS. I made a debug version of ddfilelister to output ctrlkey_passthru, and it's showing it's 0 for both of our BBSes. Also, we've tried having ddfilelister output the value of console.aborted, and it seems even when console.aborted is true, the file search continues
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Fri Nov 10 10:47:55 2023
    https://gitlab.synchro.net/main/sbbs/-/issues/638#note_4454

    I did a bit of testing

    ~~~
    console.crlf();
    writeln("console aborted: "+console.aborted);
    console.pause();
    writeln("console aborted: "+console.aborted);
    if (console.aborted) {
    writeln("let's get outta here");
    exit(1);
    }
    ~~~

    When I get to the console.pause it displays:

    ~~~
    There are no files in Local Files - Text Files
    console aborted: false
    [press a key] - ctrl-c pressed here
    console aborted: true
    let's get outta here
    [ Scanning 0.4% ]
    There are no files in Local Files - Communications Programs
    console aborted: false
    [press a key] - ctrl-c pressed here
    console aborted: true
    let's get outta here
    ~~~

    So even though it hits an exit, the scan continues.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Fri Nov 10 17:10:26 2023
    https://gitlab.synchro.net/main/sbbs/-/issues/638#note_4455

    I think this change from 7 years ago might be the reason: https://gitlab.synchro.net/main/sbbs/-/commit/c22063f9fccc53ae7d8273e775b0878e3d31a528

    I'm not sure reverting that change is a good idea. Maybe?

    If your script returns -1 (e.g. `exit(-1)`) that should stop the scan, so you could do that conditionally based on if `console.aborted === true` or not (return 0 for normal/continue).
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Fri Nov 10 18:11:05 2023
    https://gitlab.synchro.net/main/sbbs/-/issues/638#note_4457

    ~~~
    console.pause();
    if (console.aborted)
    exit(-1);
    ~~~

    Now at pause, if I press CTRL-C then it exits back to the menu immediately.

    It looks like that would resolve the issue.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Eric Oulashin@1:103/705 to GitLab note in main/sbbs on Sat Nov 11 13:39:25 2023
    https://gitlab.synchro.net/main/sbbs/-/issues/638#note_4458

    That seems to help. It looks like I have to press Ctrl-C a few times for it to detect that console.aborted is true, but the file search does stop early.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Eric Oulashin on Sat Nov 11 15:20:29 2023
    Re: Can't Control-C during a file search
    By: Eric Oulashin to GitLab note in main/sbbs on Sat Nov 11 2023 01:39 pm

    https://gitlab.synchro.net/main/sbbs/-/issues/638#note_4458

    That seems to help. It looks like I have to press Ctrl-C a few times for it to detect that console.aborted is true, but the file search does stop early.
    I'll consider reverting that change from many years ago that clears the abort flag upon completion of executing a JS script. There's likely another/better solution to that.
    --
    digital man (rob)

    Sling Blade quote #25:
    Karl: they seen fit to put me in here and here I've been a great long while. Norco, CA WX: 81.7øF, 8.0% humidity, 0 mph ENE wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From nelgin@1:103/705 to All on Mon Nov 13 01:02:58 2023
    On Sat, 11 Nov 2023 15:20:29 -0800
    "Digital Man" (VERT) <VERT!Digital.Man@endofthelinebbs.com> wrote:

    Re: Can't Control-C during a file search
    By: Eric Oulashin to GitLab note in main/sbbs on Sat Nov 11 2023
    01:39 pm

    https://gitlab.synchro.net/main/sbbs/-/issues/638#note_4458

    That seems to help. It looks like I have to press Ctrl-C a few
    times for it to detect that console.aborted is true, but the file
    search does stop early.
    I'll consider reverting that change from many years ago that clears
    the abort flag upon completion of executing a JS script. There's
    likely another/better solution to that.

    Does that means that every script that relies on console.aborted to
    exit will need to manually clear it before exiting?
    --
    End Of The Line BBS - Plano, TX
    telnet endofthelinebbs.com 23
    ---
    þ Synchronet þ End Of The Line BBS - endofthelinebbs.com
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to nelgin on Mon Nov 13 00:16:14 2023
    Re: Re: Can't Control-C during a file search
    By: nelgin to All on Mon Nov 13 2023 01:02 am

    On Sat, 11 Nov 2023 15:20:29 -0800
    "Digital Man" (VERT) <VERT!Digital.Man@endofthelinebbs.com> wrote:

    Re: Can't Control-C during a file search
    By: Eric Oulashin to GitLab note in main/sbbs on Sat Nov 11 2023
    01:39 pm

    https://gitlab.synchro.net/main/sbbs/-/issues/638#note_4458

    That seems to help. It looks like I have to press Ctrl-C a few
    times for it to detect that console.aborted is true, but the file search does stop early.
    I'll consider reverting that change from many years ago that clears
    the abort flag upon completion of executing a JS script. There's
    likely another/better solution to that.

    Does that means that every script that relies on console.aborted to
    exit will need to manually clear it before exiting?

    console.aborted is automatically cleared in sbbs (not scripts), so no, that shouldn't be the case.
    --
    digital man (rob)

    Synchronet/BBS Terminology Definition #46:
    ISDN = Integrated Services Digital Network
    Norco, CA WX: 63.0øF, 30.0% humidity, 0 mph ENE wind, 0.00 inches rain/24hrs --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Keyop Troy@1:103/705 to GitLab issue in main/sbbs on Fri Sep 13 17:32:28 2024
    close https://gitlab.synchro.net/main/sbbs/-/issues/638
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)