spawn: add optional stdin/stdout/stderr redirection FDs

If not -1, spawn() will redirect the child's stdin/stdout/stderr to
these FDs.
This commit is contained in:
Daniel Eklöf 2020-07-15 13:33:56 +02:00
parent 57f5cc1bf2
commit 69d9ff3f25
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 11 additions and 5 deletions

View file

@ -2248,7 +2248,8 @@ bool
term_spawn_new(const struct terminal *term)
{
return spawn(
term->reaper, term->cwd, (char *const []){term->foot_exe, NULL});
term->reaper, term->cwd, (char *const []){term->foot_exe, NULL},
-1, -1, -1);
}
void