2
0
mirror of https://github.com/boostorg/process.git synced 2026-02-21 15:22:11 +00:00
Files
process/doc/v2/start_dir.qbk
2022-06-04 21:19:40 +08:00

16 lines
404 B
Plaintext

[section:start_dir process_start_dir]
The easier initializer to use is `process_start_dir`:
```
asio::io_context ctx;
process ls(ctx, "/ls", {}, process_start_dir("/home"));
ls.wait();
```
This will run `ls` in the folder `/home` instead of the current folder.
[warning If your path is relative, it may fail on posix, because the directory is changed before a call to execve.]
[endsect]