Closed crose-project closed 2 years ago
It's not the quote position that changed the behavior, you changed a while loop into a one time test. Problem is, fuser doesn't always work.
With regards to Chrome crashing with it, might be that chrome is calling the busybox applet instead the full size fuser utility it expects.
Your're right, "$PWD"/$mount
, is valid code.
My main problem was the waiting time of several minutes after leaving setup-chroot
and crashing brave/chrome. The first seems to be solved after a reboot of my machine. Nevertheless, the changed order will a) reduce waiting time, cause it does the umount first and checks than if it fails and b) don't crash brave/chrome (see below).
If I understand your code right, you try to kill (fuser -kv) all pending processes and than check for mount and do a umount. My approach is 'try the umount, if it fails, do the fuser -kv, try the umount again. You're right, fuser is not always stable and also often it takes time until pending processes disappear.
I've opened a slightly modified pull request.
For the chrome/brave crash: it happens with fuser -kv "$PWD"/proc
- fortunately, with the changed order (first umount, if it fails than fuser -kv), it seems that the first try of umount succeeds and no fuser -kv
is needed.
fuser -kv "$PWD"/$mount
(independent of fixed line 219) - wonder why?