Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
268 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cmd = `sleep 10 &` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Simple background command | ||
cmd = `sleep 1; ls -la &` | ||
echo("Started") | ||
sleep(1100) | ||
echo("finished") | ||
echo(cmd) | ||
echo(cmd.ok) | ||
|
||
# Simple background command, we get the output by sleeping | ||
cmd = `sleep 1; ls -la &` | ||
echo("Started") | ||
sleep(1100) | ||
echo("finished") | ||
echo(cmd) | ||
echo(cmd.ok) | ||
|
||
# Background command wait | ||
cmd = `sleep 1; ls -la &` | ||
echo("Started") | ||
cmd.wait() | ||
echo("finished") | ||
echo(cmd) | ||
echo(cmd.ok) | ||
|
||
# Background command wait with error | ||
cmd = `sleep 1; ls la &` | ||
echo("Started") | ||
cmd.wait() | ||
echo("finished") | ||
echo(cmd) | ||
echo(cmd.ok) | ||
|
||
# TODO make cmd.wait() work |
Oops, something went wrong.