Giacomo Tesio
26bd1d8dc4
After sending the "clone" request to /proc/$pid/ns, the current process will be moved to the working directory of $pid. Otherwise the current process could still access the file and folders on the service providing its dot, even if such service was not visible to $pid. Also, keeping the original working directory means that the 'cd' line of the current process's ns file would be different from that of $pid: the two ns files must match since the command asked for a "clone". See also https://marc.info/?l=9fans&m=150893734909969&w=2