pasta_start_ns() always ends in parent context
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@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
672a8cd80e
commit
01b4e71f7a
1 changed files with 1 additions and 4 deletions
5
pasta.c
5
pasta.c
|
@ -226,10 +226,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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue