unshare –pid /bin/bash – fork cannot allocate memory
The error is caused by the PID 1 process exits in the new namespace. After bash start to run, bash will fork several new sub-processes to do somethings. If you run unshare without -f, bash will have the same pid as the current “unshare” process. The current “unshare” process call the unshare systemcall, create a … Read more