summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-11-16 12:04:11 +0100
committerJo-Philipp Wich <jo@mein.io>2020-11-16 12:04:11 +0100
commit814cb1ffb1a7bd6224e8e716505069bdf0c08b81 (patch)
treef14afadff8078d5a74c9faedb87fbb48f34b0832
parent4d8a79d62a3d1024d09193ed857371526c4f22e8 (diff)
README.md: fix typos
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--README.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/README.md b/README.md
index 2dd0173..74bf865 100644
--- a/README.md
+++ b/README.md
@@ -1000,26 +1000,26 @@ Executes the given command, waits for completion and returns the resulting
exit code.
The command argument may be either a string, in which case it is passed to
-`/bin/sh -c` or an array, which is directly converted into an `execv()`
+`/bin/sh -c`, or an array, which is directly converted into an `execv()`
argument vector.
If the program terminated normally, a positive integer holding the programs
`exit()` code is returned. If the program was terminated by an uncatched
-signal, a negative signal number is returned, e.g. `-9` if the program was
+signal, a negative signal number is returned, e.g. `-9` when the program was
terminated by `SIGKILL`.
If the optional timeout argument is specified, the program is terminated by
-`SIGKILL` after that many milliseconds if it didn't complete within the timeout.
+`SIGKILL` after that many milliseconds when it didn't complete within the timeout.
-Omitting the timeout argument, or passing `0` disabled the command timeout.
+Omitting the timeout argument, or passing `0` disables the command timeout.
```javascript
// Execute through `/bin/sh`
system("echo 'Hello world' && exit 3"); // prints "Hello world" to stdout and returns 3
// Execute argument vector
-system("/usr/bin/date", "+%s"]); // prints the UNIX timestamp to stdout and returns 0
+system(["/usr/bin/date", "+%s"]); // prints the UNIX timestamp to stdout and returns 0
// Apply a timeout
system("sleep 3 && echo 'Success'", 1000); // returns -9
-``` \ No newline at end of file
+```