Can't gracefully close rclone mount

Yes, again, sorry for trying to help you out here as I'm a glutton for it as I continue forward as you continue to insult me over and over.

I have no issues as fusermount returns properly with no IO going on:

root@gemini:~# fuser -cu /media/TV
root@gemini:~# systemctl stop rclone-tv
root@gemini:~# journalctl -u rclone-tv -b
Jul 09 17:19:47 gemini systemd[1]: Starting RClone Service Dropbox TV...
Jul 09 17:19:53 gemini rclone[1770]: {
Jul 09 17:19:53 gemini rclone[1770]:         "jobid": 1
Jul 09 17:19:53 gemini rclone[1770]: }
Jul 09 17:19:53 gemini systemd[1]: Started RClone Service Dropbox TV.
Jul 11 11:37:25 gemini systemd[1]: Stopping RClone Service Dropbox TV...
Jul 11 11:37:25 gemini systemd[1]: rclone-tv.service: Deactivated successfully.
Jul 11 11:37:25 gemini systemd[1]: Stopped RClone Service Dropbox TV.
Jul 11 11:37:25 gemini systemd[1]: rclone-tv.service: Consumed 1h 29min 11.354s CPU time.
root@gemini:~#

I used to use KillMode=none to avoid the sigterm but that's being deprecated soon as I spent quite some time avoiding SIGTERMs for a mount because it tends to leave things in a bad state as system will SIGTERM first, that won't work and it'll SIGKILL leaving it in a bad state.

Those were actually suggested by another rcloner not me as I don't use it.

My service is here but this one still has KillMode=none for now until it does actually get deprecated:

homescripts/rclone-movies.service at master · animosity22/homescripts (github.com)

Good luck.

I did not intend to insult, I'm sorry for that.

I'm assuming you know why killmode=none is a problem, I'd recommend using a program that uses pidfd_open on $MAINPID (noting that systemd docs tell you off for using $MAINPID for this reasons) and then following it with unmounting and then polling the fd acquired earlier.


An untested solution, orphaning an entire service to be potentially SIGthecomputershutsdown if there is a active fd, or writing C code just to close a service without a exit code, I do not find any to be tenable.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.