karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-2003) Interrupt a running command in shell
Date Wed, 07 Nov 2012 10:07:12 GMT

    [ https://issues.apache.org/jira/browse/KARAF-2003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13492241#comment-13492241
] 

Guillaume Nodet commented on KARAF-2003:
----------------------------------------

What we could do is provide a checkInterrupted() method on the AbstractAction and have long
running commands regularly call it.

{code}
public void checkInterrupted() throws InterruptedException {
    Thread.yield(); 
    if (Thread.currentThread().isInterrupted()) {
        throw new InterruptedException();
    }
}
{code}

                
> Interrupt a running command in shell
> ------------------------------------
>
>                 Key: KARAF-2003
>                 URL: https://issues.apache.org/jira/browse/KARAF-2003
>             Project: Karaf
>          Issue Type: Improvement
>          Components: karaf-shell
>            Reporter: Achim Nierbeck
>            Priority: Minor
>             Fix For: 3.0.0
>
>
> Right now it's not possible to interrupt a "long" running command. For example by using
ctrl-c to stop it like in a unix shell. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message