Do not fork a new process to unmount if user is privileged
The root user can issue the umount syscall and does not need the
fusermount binary. Therefore, it is not necessary to fork and exec a new
process just to run the umount binary.
Golang has a global lock held for forking (See exec_unix.go in the golang
source tree):
"Acquire the fork lock so that no other threads create new fds that are
not yet close-on-exec before we fork."
So it would be best if processes would refrain from forking
unnecessarily.
Signed-off-by: Shayan Pooya <shayan@arista.com>
Showing
Please register or sign in to comment