]> git.ipfire.org Git - pakfire.git/commit
libpakfire: execute: Use clone() instead of fork()
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 14 Jan 2021 13:14:27 +0000 (13:14 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 14 Jan 2021 13:14:27 +0000 (13:14 +0000)
commit9bc2b5ee092ea4b5dceb7f6066404ac4012ae3f9
tree3cc83a7a81c3565ca739288daecc0b859df5bc76
parent5c7753e783d9fe040143d9dea3076833cc2f7169
libpakfire: execute: Use clone() instead of fork()

This avoids copying the whole process (which could be quite large) and
spawn the new process into a new namespace straight away without needing
to call unshare(2) later.

This should be a little bit faster when executing many commands.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/execute.c