#65 Allow CTL-C to abort commands, not urjtag

Uwe Bonnes


some commands may take a while, like discovery. CTL-C with the command running at the moment aborts jtag and not the command. What about appending patch? It installs a signal handler during command execution and commands can react on CTL-C as shown for IDCODE and DISCOVERY.


  • Uwe Bonnes

    Uwe Bonnes - 2008-04-04
  • Kolja Waschk

    Kolja Waschk - 2008-04-04

    Logged In: YES
    Originator: NO

    Good idea! Cancelling commands was also missing in the http://urjtag.wiki.sourceforge.net/FutureProtocol - I added it after seeing this here.

    The only sour note is that it adds another global variable. While this will work fine if there's only one chain, there'll be race conditions setting/resetting stop_loop if there are similar activities on two chains at the same time. "stop_loop" should probably become part of chain_t, to be set only for the chains currently executing commands.

    It has to be ensured that stop_loop is always correctly reset; otherwise a later command might not execute just because Ctrl-C was hit during execution before during a command that doesn't reset it...

  • Mike Frysinger

    Mike Frysinger - 2010-07-14
    • assigned_to: nobody --> vapier

Log in to post a comment.