aboutsummaryrefslogtreecommitdiff
path: root/stage2
diff options
context:
space:
mode:
Diffstat (limited to 'stage2')
-rw-r--r--stage2/BasicBuild.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/stage2/BasicBuild.scala b/stage2/BasicBuild.scala
index e41545b..3a9c958 100644
--- a/stage2/BasicBuild.scala
+++ b/stage2/BasicBuild.scala
@@ -327,6 +327,19 @@ trait BaseBuild extends BuildInterface with DependencyImplementation with SbtDep
waitFor()
}
+ /** currently only produces output when run via cbt direct */
+ def restart: Int = {
+ val pid = restart( mainClassOrFail.getName, context.args )
+ System.err.print("started process with pid: ")
+ pid
+ }
+
+ def restart( className: String, args: Seq[String] ): Int = {
+ val ( pid, waitFor, destroy ) = runForked( mainClassOrFail.getName, context.args )
+ lib.addProcessIdToKillList( context.cwd, pid )
+ pid
+ }
+
protected def runForkedHandles = runForked( mainClassOrFail.getName, context.args )
def runForked( className: String, args: Seq[String] ): ( Int, () => ExitCode, () => ExitCode ) =