webui: support mount master mode

This commit is contained in:
weishu
2024-02-29 13:55:02 +08:00
parent f459dfad54
commit 922703d2ff
2 changed files with 10 additions and 5 deletions

View File

@@ -16,6 +16,7 @@ Spawns a **root** shell and runs a command within that shell, passing the `stdou
- `options` `<Object>`
- `cwd` - Current working directory of the child process
- `env` - Environment key-value pairs
- `mm` `boolean` - Mount master mode, true to enter global mount namespace
```javascript
import { exec } from 'kernelsu';
@@ -38,6 +39,7 @@ Returns a `ChildProcess`, Instances of the ChildProcess represent spawned child
- `options` `<Object>`:
- `cwd` `<string>` - Current working directory of the child process
- `env` `<Object>` - Environment key-value pairs
- `mm` `boolean` - Mount master mode, true to enter global mount namespace
Example of running `ls -lh /data`, capturing `stdout`, `stderr`, and the exit code: