Quarkus: Gradle quarkusDev keeps running in background after Ctrl+C is issued

Created on 7 Oct 2019  路  3Comments  路  Source: quarkusio/quarkus

Describe the bug
During gradle quarkusDev, if you press Ctrl+C to terminate the Gradle execution, you can see that the application is still running in the daemon process

Expected behavior
Application is killed

Actual behavior
Application is still running in the Gradle daemon thread.

To Reproduce
Steps to reproduce the behavior:

  1. Generate a Gradle project
  2. Run gradle quarkusDev
  3. In another terminal, run curl http://localhost:8080, you should see a webpage
  4. Go back to the original terminal and stop the execution using Ctrl +C. The process should be no longer running
  5. Run curl http://localhost:8080 and you still see the webpage

Environment (please complete the following information):

  • Output of uname -a or ver: Linux ggastald-laptop 5.2.17-200.fc30.x86_64 #1 SMP Mon Sep 23 13:42:32 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  • Output of java -version:
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_212-b03)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.212-b03, mixed mode)
  • GraalVM version (if different from Java): Not applicable
  • Quarkus version or git rev: 999-SNAPSHOT

Additional context
(Add any other context about the problem here.)
Adding org.gradle.daemon=false to the gradle.properties file fixes the problem. Perhaps it would be nice to set this property when quarkusDev runs?

aregradle kinbug

Most helpful comment

The Daemon thread is marked as CANCELED and is removed when any other gradle task is executed, so I guess this is fine

I wouldn't consider it "fine", it's highly annoying if the ports are still occupied.

All 3 comments

Using gradle quarkusDev --no-daemon is another workaround

The Daemon thread is marked as CANCELED and is removed when any other gradle task is executed, so I guess this is fine

The Daemon thread is marked as CANCELED and is removed when any other gradle task is executed, so I guess this is fine

I wouldn't consider it "fine", it's highly annoying if the ports are still occupied.

Was this page helpful?
0 / 5 - 0 ratings