You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Vamsavardhana Reddy (JIRA)" <ji...@apache.org> on 2008/03/21 07:33:25 UTC

[jira] Created: (GSHELL-106) Problem when Geronimo 2.1 server is started using "start-server"

Problem when Geronimo 2.1 server is started using "start-server"
----------------------------------------------------------------

                 Key: GSHELL-106
                 URL: https://issues.apache.org/jira/browse/GSHELL-106
             Project: GShell
          Issue Type: Bug
      Security Level: public (Regular issues)
    Affects Versions: 1.0-alpha-1
         Environment: Win XP, G Tomcat 2.1
            Reporter: Vamsavardhana Reddy
            Assignee: Jason Dillon


On Windows XP, if I start a Geronimo Tomcat 2.1 server using bin\start-server from a command prompt, I am noticing that the server can not be shutdown using Control+C.  So, I am using Admin Console to shutdown the server.  But it does not return to command prompt unless I kill the java process from Windows Task Manager.

Jarek says, "As a workaround, you can start gshell with -T false option and then
control-c worked fine while running the server in foreground."

See http://www.mail-archive.com/dev@geronimo.apache.org/msg57308.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Created: (GSHELL-106) Problem when Geronimo 2.1 server is started using "start-server"

Posted by Jarek Gawor <jg...@gmail.com>.
It does not stop. Shutdown hooks are not being invoked so maybe the
control-c signal gets lost or ignored.

Jarek

On Fri, Mar 21, 2008 at 2:59 AM, Jason Dillon <ja...@planet57.com> wrote:
> Are you sure it doesn't stop or that it just takes a while for the
>  terminal to exit?
>
>  --jason
>
>
>
>
>  On Mar 21, 2008, at 1:33 PM, Vamsavardhana Reddy (JIRA) wrote:
>
>  > Problem when Geronimo 2.1 server is started using "start-server"
>  > ----------------------------------------------------------------
>  >
>  >                 Key: GSHELL-106
>  >                 URL: https://issues.apache.org/jira/browse/GSHELL-106
>  >             Project: GShell
>  >          Issue Type: Bug
>  >      Security Level: public (Regular issues)
>  >    Affects Versions: 1.0-alpha-1
>  >         Environment: Win XP, G Tomcat 2.1
>  >            Reporter: Vamsavardhana Reddy
>  >            Assignee: Jason Dillon
>  >
>  >
>  > On Windows XP, if I start a Geronimo Tomcat 2.1 server using bin
>  > \start-server from a command prompt, I am noticing that the server
>  > can not be shutdown using Control+C.  So, I am using Admin Console
>  > to shutdown the server.  But it does not return to command prompt
>  > unless I kill the java process from Windows Task Manager.
>  >
>  > Jarek says, "As a workaround, you can start gshell with -T false
>  > option and then
>  > control-c worked fine while running the server in foreground."
>  >
>  > See http://www.mail-archive.com/dev@geronimo.apache.org/msg57308.html
>  >
>  > --
>  > This message is automatically generated by JIRA.
>  > -
>  > You can reply to this email to add a comment to the issue online.
>  >
>
>

Re: [jira] Created: (GSHELL-106) Problem when Geronimo 2.1 server is started using "start-server"

Posted by Jason Dillon <ja...@planet57.com>.
Are you sure it doesn't stop or that it just takes a while for the  
terminal to exit?

--jason


On Mar 21, 2008, at 1:33 PM, Vamsavardhana Reddy (JIRA) wrote:

> Problem when Geronimo 2.1 server is started using "start-server"
> ----------------------------------------------------------------
>
>                 Key: GSHELL-106
>                 URL: https://issues.apache.org/jira/browse/GSHELL-106
>             Project: GShell
>          Issue Type: Bug
>      Security Level: public (Regular issues)
>    Affects Versions: 1.0-alpha-1
>         Environment: Win XP, G Tomcat 2.1
>            Reporter: Vamsavardhana Reddy
>            Assignee: Jason Dillon
>
>
> On Windows XP, if I start a Geronimo Tomcat 2.1 server using bin 
> \start-server from a command prompt, I am noticing that the server  
> can not be shutdown using Control+C.  So, I am using Admin Console  
> to shutdown the server.  But it does not return to command prompt  
> unless I kill the java process from Windows Task Manager.
>
> Jarek says, "As a workaround, you can start gshell with -T false  
> option and then
> control-c worked fine while running the server in foreground."
>
> See http://www.mail-archive.com/dev@geronimo.apache.org/msg57308.html
>
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>


[jira] Updated: (GERONIMO-3978) Unable to CTRL-C "start-server" process on Windows

Posted by "Jason Dillon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-3978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason Dillon updated GERONIMO-3978:
-----------------------------------

    Summary: Unable to CTRL-C "start-server" process on Windows  (was: Problem when Geronimo 2.1 server is started using "start-server")

> Unable to CTRL-C "start-server" process on Windows
> --------------------------------------------------
>
>                 Key: GERONIMO-3978
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3978
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>         Environment: Win XP, G Tomcat 2.1
>            Reporter: Vamsavardhana Reddy
>            Assignee: Jason Dillon
>
> On Windows XP, if I start a Geronimo Tomcat 2.1 server using bin\start-server from a command prompt, I am noticing that the server can not be shutdown using Control+C.  So, I am using Admin Console to shutdown the server.  But it does not return to command prompt unless I kill the java process from Windows Task Manager.
> Jarek says, "As a workaround, you can start gshell with -T false option and then
> control-c worked fine while running the server in foreground."
> See http://www.mail-archive.com/dev@geronimo.apache.org/msg57308.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-3978) Unable to CTRL-C "start-server" process on Windows

Posted by "ant elder (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-3978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885176#action_12885176 ] 

ant elder commented on GERONIMO-3978:
-------------------------------------

Coincidentally, I've a similar problem with Tuscany using JLine and ctrl-c not working so googling for solutions i found this JIRA along with many others trying to fix it with no answers. So i did some debugging of the JLine code and I think the problem is in the windowsbindings.properties file shipped inside jline which maps ctrl-c to INSERT with a comment saying "(frankly, I wasn't sure where to bind this)". That does not seem a great choice as that is what disables the ctrl-c interupt. It is possible to pass in your own bindings properties file but to do that has some problems of its own so the simplest solution seemed to be the following code which resets the ctrl-c binding:

       ConsoleReader reader = ...

        try {
            Field f = ConsoleReader.class.getDeclaredField("keybindings");
            f.setAccessible(true);
            short[] keybindings = (short[])f.get(reader);
            if (keybindings[3] == -48) keybindings[3] = 3;
        } catch (Exception e) {
            e.printStackTrace(); // shouldnt happen
        }

You can then add an ActionListener to do what you want when ctrl-c is pressed, eg:

        reader.addTriggeredAction((char)3, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                System.exit(0);
            }
        });





> Unable to CTRL-C "start-server" process on Windows
> --------------------------------------------------
>
>                 Key: GERONIMO-3978
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3978
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>         Environment: Win XP, G Tomcat 2.1
>            Reporter: Vamsavardhana Reddy
>            Assignee: Jason Dillon
>
> On Windows XP, if I start a Geronimo Tomcat 2.1 server using bin\start-server from a command prompt, I am noticing that the server can not be shutdown using Control+C.  So, I am using Admin Console to shutdown the server.  But it does not return to command prompt unless I kill the java process from Windows Task Manager.
> Jarek says, "As a workaround, you can start gshell with -T false option and then
> control-c worked fine while running the server in foreground."
> See http://www.mail-archive.com/dev@geronimo.apache.org/msg57308.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-3978) Problem when Geronimo 2.1 server is started using "start-server"

Posted by "Jason Dillon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-3978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12591761#action_12591761 ] 

Jason Dillon commented on GERONIMO-3978:
----------------------------------------

This has something todo with JLine... looking into it more.

> Problem when Geronimo 2.1 server is started using "start-server"
> ----------------------------------------------------------------
>
>                 Key: GERONIMO-3978
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3978
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>         Environment: Win XP, G Tomcat 2.1
>            Reporter: Vamsavardhana Reddy
>            Assignee: Jason Dillon
>
> On Windows XP, if I start a Geronimo Tomcat 2.1 server using bin\start-server from a command prompt, I am noticing that the server can not be shutdown using Control+C.  So, I am using Admin Console to shutdown the server.  But it does not return to command prompt unless I kill the java process from Windows Task Manager.
> Jarek says, "As a workaround, you can start gshell with -T false option and then
> control-c worked fine while running the server in foreground."
> See http://www.mail-archive.com/dev@geronimo.apache.org/msg57308.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.