On Thu, Oct 24, 2019 at 11:26:11AM +0100, Daniel P. Berrangé wrote: > On Wed, Oct 16, 2019 at 05:01:57PM +0100, Stefan Hajnoczi wrote: > It might be useful to call prctl(PR_SET_PDEATHSIG) here, so that > if the parent process exits for any reason, the child will be killed > off too. [...] > I feel like this is making things a bit misleading. > > setup_pid_namespace() > > is now creating the mount namespace and pid namespace, and doing > some mount point config > > setup_mount_namespace() > > is not creating the mount namespace, but is doing some more mount > point config. > > And then there's setup_net_namespace() too. > > I think there could be a single > > setup_namespaces() > > method that does the unshare(CLONE_NEWNS|CLONE_NEWNET|CLONE_NEWPID) > and forking the child. > > And a setup_mounts() > > method that does all the mount() calls.
Thanks for your suggestions. I'll implement both of them as follow-up patches since this has already been included in the virtiofsd code. Stefan
signature.asc
Description: PGP signature