1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

@PERL and ^C

Discussion in 'Support' started by Jim Cook, Sep 25, 2008.

  1. Jim Cook

    Joined:
    May 20, 2008
    Messages:
    604
    Likes Received:
    0
    TCC 9.02.152 Windows XP [Version 5.1.2600]
    TCC Build 152 Windows XP Build 2600 Service Pack 3

    When I do this and type "hello<enter>" it does what I'd expect.
    However, if I press ^C when it is waiting, the whole window vanishes.
    It happens whether a stand-alone TCC or within a TCMD tab.

    Can others reproduce this? I fear maybe not, because I have a
    suspicion that the original fault comes from within my machine's
    perl.dll

    echo "%@perl[$_=<>]"

    --
    2008 Fridays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
    Next year they're Saturday.
    Measure wealth by the things you have for which you would not take money.
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,027
    Likes Received:
    84
    Jim Cook wrote:

    That's a long-standing bug in the Perl DLL. There is no workaround at
    this time; it will require fixing the Perl code and releasing our own
    version, something I'm highly reluctant to do.

    Rex Conn
    JP Software
     
  3. p.f.moore

    Joined:
    May 30, 2008
    Messages:
    122
    Likes Received:
    1
    2008/9/26 JP Software Forums <neil@jpsoft.com>:

    Rex,
    Can you explain the exact nature of the bug in Perl, and in broad
    terms what would have to be done to the Perl code to fix it?

    The reason I ask is that I reported a very similar problem in the
    "Plugins" forum some time ago (the only reference I can give is the
    tag attached to the email header: Plugins-t-338) where my own Lua
    plugin was crashing the TCC instance when Ctrl-C was pressed while the
    plugin was in a GetLine call waiting for input. I reproduced the
    problem in a small test case and determined that it was related to
    (the lack of) break handling in my plugin - it appears that TCC
    doesn't provide a default break handler to catch issues (which I'd
    consider a bug, but I suspect would be deemed as WAD). Nevertheless,
    if you can explain how to write "correct" break handlers for a plugin
    (I'm guessing from the symptoms that the Perl issue is similar) that
    would be immensely useful. (And yes, I know that reading the MS
    documentation should give me the details I need, but I have done so,
    and experimented endlessly, but I cannot work out what is needed to
    write a clean break handler that regains control from within GetLine
    in a way that allows me to resume processing).

    Paul.
     
  4. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,063
    Likes Received:
    30
    On Fri, 26 Sep 2008 03:42:48 -0500, "JP Software Forums"
    <neil@jpsoft.com>,"p.f.moore" <> wrote:


    On 10/6/2006, Rex Conn wrote:

    "That's a bug in the Active State Perl -- they're intercepting the ^C and
    unconditionally shutting down the parent app (4NT in this case)."

    At the time, I investigated the Perl source code. It's true.
     
  5. Jim Cook

    Joined:
    May 20, 2008
    Messages:
    604
    Likes Received:
    0

    I was pretty sure that was the case, and you may even be able to find
    historical messages where I've asked the same question and been
    answered the same way. I hope not, but ....

    Thanks again for the information.

    --
    2008 Fridays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
    Next year they're Saturday.
    Measure wealth by the things you have for which you would not take money.
     

Share This Page