File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,24 @@ for await (const line of result) {
32
32
}
33
33
```
34
34
35
+ ### Options
36
+
37
+ Options can be passed to have finer control over spawning of the process:
38
+
39
+ ``` ts
40
+ await x (' ls' , [], {
41
+ timeout: 1000
42
+ });
43
+ ```
44
+
45
+ The options object can have the following properties:
46
+
47
+ - ` signal ` - an ` AbortSignal ` to allow aborting of the execution
48
+ - ` timeout ` - time in milliseconds at which the process will be forceably killed
49
+ - ` persist ` - if ` true ` , the process will continue after the host exits
50
+ - ` stdin ` - another ` Result ` can be used as the input to this process
51
+ - ` nodeOptions ` - any valid options to node's underlying ` spawn ` function
52
+
35
53
### Piping to another process
36
54
37
55
You can pipe a process to another via the ` pipe ` method:
You can’t perform that action at this time.
0 commit comments