Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Aug 5, 2023
1 parent 827fec3 commit 0e370a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand All @@ -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
```
Expand Down
2 changes: 1 addition & 1 deletion mod.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);'`
Expand Down

0 comments on commit 0e370a8

Please sign in to comment.