diff --git a/README.md b/README.md index 4e149ed..46cec3a 100644 --- a/README.md +++ b/README.md @@ -241,7 +241,7 @@ const child = $`echo 1 && sleep 100 && echo 2`.spawn(); // kill the child after 1s await $.sleep("1s"); -child.kill(); // or provide other signals like "SIGKILL". It uses "SIGTERM" by default +child.kill(); // defaults to "SIGTERM" await child; // Error: Aborted with exit code: 124 ``` @@ -262,7 +262,7 @@ const promise = Promise.all([ $`sleep 3000s`.signal(signal), ]); -$.sleep("1s").then(() => controller.kill("SIGKILL")); +$.sleep("1s").then(() => controller.kill()); // defaults to "SIGTERM" await promise; // throws after 1 second ``` diff --git a/mod.test.ts b/mod.test.ts index cfcbd21..9ab9dd9 100644 --- a/mod.test.ts +++ b/mod.test.ts @@ -873,7 +873,7 @@ Deno.test("streaming api errors while streaming", async () => { } { - const child = $`echo 1 && echo 2 && sleep 0.5 && exit 1`.stdout("piped").spawn(); + const child = $`echo 1 && echo 2 && sleep 0.6 && exit 1`.stdout("piped").spawn(); const stdout = child.stdout(); const result = await $`deno eval 'await Deno.stdin.readable.pipeTo(Deno.stdout.writable);'`