I'm fiddling with libfuse
and I find useful the rules make mount
which executes the userspace fuse daemon and make umount
to unmount the directory. Unfortunately if I start the daemon in the make mount
rule, this gets killed as soon as make exits (when the rule is completed).
Is it possible to spawn a daemon from a make rule such that the daemon persists the exit of make?
Make is the wrong tool for the job here. It shouldn't be used as a supervisor for other processes and anything it starts should end when it does.
That being said you can easily unhitch processes so that kill signals are not propagated when processes terminate. Running your fuse daemon prefixed by
nohup …
should stop the signals from reaching the child process and it will go on it's merry way.