We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a357131 + 50d92c1 commit 72dfd61Copy full SHA for 72dfd61
main/src/main/java/org/apache/karaf/main/Stop.java
@@ -56,11 +56,13 @@ public static void main(String[] args) throws Exception {
56
if (config.shutdownPort > 0) {
57
try (Socket s = new Socket(config.shutdownHost, config.shutdownPort)) {
58
s.getOutputStream().write(config.shutdownCommand.getBytes());
59
- System.exit(0);
+ s.getOutputStream().write('\n');
60
+ s.getOutputStream().flush();
61
} catch (ConnectException connectException) {
62
System.err.println("Can't connect to the container. The container is not running.");
63
System.exit(1);
64
}
65
+ System.exit(0);
66
} else {
67
// using the pid file
68
int pid = getPidFromPidFile(config.pidFile);
0 commit comments