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

@ -3,4 +3,5 @@
#include <stdbool.h>
#include "reaper.h"
bool spawn(struct reaper *reaper, const char *cwd, char *const argv[]);
bool spawn(struct reaper *reaper, const char *cwd, char *const argv[],
int stdin_fd, int stdout_fd, int stderr_fd);