Domanda

Prior to version 2.3 a Grails application started in a console window with "run-app" (development mode) could be terminated with Ctrl-C. It doesn't work anymore with Grails 2.3, the keystroke is simply ignored. There's "stop-app" command, but it doesn't terminate the running application either.

I can terminate the app by killing the console window, but I prefer not to do so, because in this case I'm loosing all debugging output that was printed to that console.

È stato utile?

Soluzione

My problem was fixed by upgrading from Grails 2.3.4 to 2.3.7. In Grails 2.3.7 Ctrl-C, "run-app" and "stop-app" behave as documented. I consider this case closed.

(I'm not sure if this qualifies as the answer, but I feel that the question deserves some form of a closure...)

Altri suggerimenti

From http://grails.org/doc/2.3.x/guide/commandLine.html#forkedMode "Since Grails 2.3, the run-app, run-war, test-app and console commands are now executed in a forked JVM in order to isolate the build classpath from the runtime classpath."

You'll notice that two java.exe processes are created if you use these default settings, and CTRL-C only kills one of them.

I noticed this myself. Just comment out the following line in your BuildConfig.groovy

run: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256],

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top