Skip to content

Commit 053ebdc

Browse files
committed
.
1 parent be896b4 commit 053ebdc

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

Readme.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,7 +1727,7 @@ os.call(cmd: os.Shellable,
17271727
check: Boolean = true,
17281728
propagateEnv: Boolean = true,
17291729
shutdownGracePeriod: Long = 100,
1730-
shutdownHook: Boolean = true): os.CommandResult
1730+
destroyOnExit: Boolean = true): os.CommandResult
17311731
----
17321732

17331733
_Also callable via `os.proc(cmd).call(...)`_
@@ -1857,7 +1857,7 @@ os.spawn(cmd: os.Shellable,
18571857
mergeErrIntoOut: Boolean = false,
18581858
propagateEnv: Boolean = true,
18591859
shutdownGracePeriod: Long = 100,
1860-
shutdownHook: Boolean = true): os.SubProcess
1860+
destroyOnExit: Boolean = true): os.SubProcess
18611861
----
18621862

18631863
_Also callable via `os.proc(cmd).spawn(...)`_

os/src/ProcessOps.scala

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ object call {
2626
check: Boolean = true,
2727
propagateEnv: Boolean = true,
2828
shutdownGracePeriod: Long = 100,
29-
shutdownHook: Boolean = true
29+
destroyOnExit: Boolean = true
3030
): CommandResult = {
3131
os.proc(cmd).call(
3232
cwd = cwd,
@@ -39,7 +39,7 @@ object call {
3939
check = check,
4040
propagateEnv = propagateEnv,
4141
shutdownGracePeriod = shutdownGracePeriod,
42-
shutdownHook = shutdownHook
42+
destroyOnExit = destroyOnExit
4343
)
4444
}
4545
def apply(
@@ -69,7 +69,7 @@ object call {
6969
check = check,
7070
propagateEnv = propagateEnv,
7171
shutdownGracePeriod = timeoutGracePeriod,
72-
shutdownHook = false
72+
destroyOnExit = false
7373
)
7474
}
7575
}
@@ -90,7 +90,7 @@ object spawn {
9090
mergeErrIntoOut: Boolean = false,
9191
propagateEnv: Boolean = true,
9292
shutdownGracePeriod: Long = 100,
93-
shutdownHook: Boolean = true
93+
destroyOnExit: Boolean = true
9494
): SubProcess = {
9595
os.proc(cmd).spawn(
9696
cwd = cwd,
@@ -101,7 +101,7 @@ object spawn {
101101
mergeErrIntoOut = mergeErrIntoOut,
102102
propagateEnv = propagateEnv,
103103
shutdownGracePeriod = shutdownGracePeriod,
104-
shutdownHook = shutdownHook
104+
destroyOnExit = destroyOnExit
105105
)
106106
}
107107
def apply(
@@ -126,7 +126,7 @@ object spawn {
126126
mergeErrIntoOut = mergeErrIntoOut,
127127
propagateEnv = propagateEnv,
128128
shutdownGracePeriod = 100,
129-
shutdownHook = false
129+
destroyOnExit = false
130130
)
131131
}
132132
}
@@ -197,7 +197,7 @@ case class proc(command: Shellable*) {
197197
propagateEnv: Boolean = true,
198198
// this cannot be next to `timeout` as this will introduce a bin-compat break (default arguments are numbered in the bytecode)
199199
shutdownGracePeriod: Long = 100,
200-
shutdownHook: Boolean = true
200+
destroyOnExit: Boolean = true
201201
): CommandResult = {
202202

203203
val chunks = new java.util.concurrent.ConcurrentLinkedQueue[Either[geny.Bytes, geny.Bytes]]
@@ -272,7 +272,7 @@ case class proc(command: Shellable*) {
272272
check,
273273
propagateEnv,
274274
timeoutGracePeriod,
275-
shutdownHook = false
275+
destroyOnExit = false
276276
)
277277

278278
/**
@@ -294,7 +294,7 @@ case class proc(command: Shellable*) {
294294
mergeErrIntoOut: Boolean = false,
295295
propagateEnv: Boolean = true,
296296
shutdownGracePeriod: Long = 100,
297-
shutdownHook: Boolean = true
297+
destroyOnExit: Boolean = true
298298
): SubProcess = {
299299

300300
val cmdChunks = commandChunks
@@ -317,7 +317,7 @@ case class proc(command: Shellable*) {
317317
)
318318

319319
lazy val shutdownHookThread =
320-
if (!shutdownHook) None
320+
if (!destroyOnExit) None
321321
else Some(new Thread("subprocess-shutdown-hook") {
322322
override def run(): Unit = proc.destroy(shutdownGracePeriod)
323323
})
@@ -368,7 +368,7 @@ case class proc(command: Shellable*) {
368368
mergeErrIntoOut = mergeErrIntoOut,
369369
propagateEnv = propagateEnv,
370370
shutdownGracePeriod = 100,
371-
shutdownHook = false
371+
destroyOnExit = false
372372
)
373373

374374
/**

os/test/testSpawnExitHook/src/TestSpawnExitHook.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package test.os
22

33
object TestSpawnExitHook {
44
def main(args: Array[String]): Unit = {
5-
os.spawn((sys.env("TEST_SPAWN_EXIT_HOOK_ASSEMBLY2"), args(0)), shutdownHook = true)
5+
os.spawn((sys.env("TEST_SPAWN_EXIT_HOOK_ASSEMBLY2"), args(0)), destroyOnExit = true)
66
Thread.sleep(99999)
77
}
88
}

0 commit comments

Comments
 (0)