:: Re: [DNG] Preferred automounter beh…
Kezdőlap
Delete this message
Reply to this message
Szerző: Steve Litt
Dátum:  
Címzett: dng
Tárgy: Re: [DNG] Preferred automounter behavior?
On Sat, 26 Dec 2015 16:10:41 +0100
Didier Kryn <kryn@???> wrote:


>      Although I don't know Python, I have read enough about it to
> know it fits well with the kind of job. I suggest using
> python-inotify rather than piping inotifywait to your daemon. I think
> it would be better because it is not so easy to manage a pair of
> daemons: when you kill your automounter, the associated inotifywait
> is not necessarily killed in the same time.


The preceding paragraph by Didier saved me a lot of embarrassment later
on. Just because you can run the pipeline at a command prompt doesn't
mean a process supervisor will handle it right, and an afternoon of
experimenting with Runit confirmed exactly what you say in your
preceding paragraph.

So I found a slightly different way to code the Python program such
that when you kill the Python program, you kill inotifywait, and when
you kill inotifywait, you terminate the Python program, and confirmed
that my new way works well in Runit, which probably also means it runs
well in daemontools-encore or s6, and very well might run right, out of
the box, when declared as a respawn in /etc/inittab or as a command
in /etc/rc.local. I predict I'll have something working by tomorrow
night.

Thanks,

SteveT

Steve Litt 
November 2015 featured book: Troubleshooting Techniques
     of the Successful Technologist
http://www.troubleshooters.com/techniques