mirror of
https://github.com/apache/maven-mvnd.git
synced 2025-09-10 13:15:27 +00:00
Do not display exceptions stack trace when trying to stop already stopped daemons, fixes #15
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.jboss.fuse.mvnd.daemon;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
@@ -92,8 +93,15 @@ public class Client {
|
||||
if (dis.length > 0) {
|
||||
System.out.println("Stopping " + dis.length + " running daemons");
|
||||
for (DaemonInfo di : dis) {
|
||||
new ProcessImpl(di.getPid()).destroy();
|
||||
registry.remove(di.getUid());
|
||||
try {
|
||||
new ProcessImpl(di.getPid()).destroy();
|
||||
} catch (IOException t) {
|
||||
System.out.println("Daemon " + di.getUid() + ": " + t.getMessage());
|
||||
} catch (Exception t) {
|
||||
System.out.println("Daemon " + di.getUid() + ": " + t);
|
||||
} finally {
|
||||
registry.remove(di.getUid());
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
Reference in New Issue
Block a user