diff --git a/gradle-plugins/cordformation/src/noderunner/kotlin/net/corda/plugins/NodeRunner.kt b/gradle-plugins/cordformation/src/noderunner/kotlin/net/corda/plugins/NodeRunner.kt index 907a9126a4..be3bb6d019 100644 --- a/gradle-plugins/cordformation/src/noderunner/kotlin/net/corda/plugins/NodeRunner.kt +++ b/gradle-plugins/cordformation/src/noderunner/kotlin/net/corda/plugins/NodeRunner.kt @@ -94,7 +94,8 @@ end tell""") listOf("cmd", "/C", "start ${command.joinToString(" ")}") } OS.LINUX -> { - val command = "${unixCommand()} || sh" + // Start shell to keep window open unless java terminated normally or due to SIGTERM: + val command = "${unixCommand()}; [ $? -eq 0 -o $? -eq 143 ] || sh" if (isTmux()) { listOf("tmux", "new-window", "-n", nodeName, command) } else {