The end of pasta_start_ns() has a test against pasta_child_pid, testing if we're in the parent or the child. However we started the child running the pasta_setup_ns function which always exec()s or exit()s, so if we return from the clone() we are always in the parent, making that test unnecessary. Signed-off-by: David Gibson <david(a)gibson.dropbear.id.au> --- pasta.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pasta.c b/pasta.c index 97cd318..1569590 100644 --- a/pasta.c +++ b/pasta.c @@ -225,10 +225,7 @@ void pasta_start_ns(struct ctx *c, int argc, char *argv[]) drop_caps(); - if (pasta_child_pid) { - NS_CALL(pasta_wait_for_ns, c); - return; - } + NS_CALL(pasta_wait_for_ns, c); } /** -- 2.37.3