[common] Add a way to set the process startup directory (#63)

This will be needed later for switching to sftp, since calling lcd in
sftp is tricky to get right (e.g. may or may not require /cygwin/c on
Windows, depending on whether sftp is native or not).
This commit is contained in:
Lutz Justen
2023-01-16 12:26:45 +01:00
committed by GitHub
parent 42f5ee9b44
commit f2177969fe
3 changed files with 24 additions and 2 deletions
+4
View File
@@ -53,6 +53,10 @@ struct ProcessStartInfo {
// Command line, UTF-8 encoded.
std::string command;
// Full path to the process startup working directory.
// If empty, uses parent process working dir.
std::string startup_dir;
// If set, the process stdin is redirected to a pipe.
// It not set, the input is connected to the stdin of the calling process.
bool redirect_stdin = false;