init: fixed issues related to forking services
Fixed issues related to forking services into new PID + mount namespaces. Remounting rootfs recursively as slave when creating a service in new PID + mount namespaces. This prevents the service from interfering with mount points in the parent namespace. Unmount then mount /proc instead of mounting it with MS_REMOUNT, since MS_REMOUNT is not sufficient to update /proc to the state appropriate for the new PID namespace. Note that the /proc mount options specified here are not the same as those used in the default mount namespace. I kept them consistent with those used in the code prior to this fix. Test: Used custom sleepd service to test init 'namespace' keyword. Tested on angler in oreo-dev - I had to add PID namespaces to the kernel (commit ad82c662). Change-Id: I859104525f82fef3400d5abbad465331fc3d732f
Loading
Please register or sign in to comment