core: use fexecve() to spawn children

We base the smack/selinux setup on the executable. Let's open the file
once and use the same fd for that setup and the subsequent execve.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2020-11-06 15:13:01 +01:00
parent 5ca9139ace
commit b83d505087
2 changed files with 14 additions and 8 deletions
-1
View File
@@ -33,7 +33,6 @@
assert_cc(EAGAIN == EWOULDBLOCK);
static int do_spawn(const char *path, char *argv[], int stdout_fd, pid_t *pid) {
pid_t _pid;
int r;