On 12/26/15 7:09 PM, Steve Litt wrote:
> I'm making a thumb drive automounter using inotifywait piped into my
> Python program, which detects the proper CREATES and DELETES and
> automounts and autoumounts accordingly.
>
> Here's what I thought the run script would look like (runit dialect):
>
>
On Sat, 26 Dec 2015 18:25:22 +0100
Laurent Bercot wrote:
> On 2015-12-26 18:09, Steve Litt wrote:
> > #!/bin/sh
> > exec /usr/bin/inotifywait /dev/disk
> > | /usr/local/bin/automounter.py
>
> You can't supervise a pipeline per se; you need to supervise
> both processes in the pipeline indepe
On 12/26/2015 12:09 PM, Steve Litt wrote:
Is this doable in a way consistent with supervision suites?
Pipelines can form practically indefinite graphs in scope owing to the
nature of fds (modulo process control limitations and space
constraints). You might be interested in pipexec, which expl
On 2015-12-26 18:09, Steve Litt wrote:
#!/bin/sh
exec /usr/bin/inotifywait /dev/disk | /usr/local/bin/automounter.py
You can't supervise a pipeline per se; you need to supervise
both processes in the pipeline independently, and make sure the pipe
isn't broken when one of them dies.
So, have
Two things:
I'm not at a computer but I'm *pretty* sure exec foo | bar doesn't work
right?
But more importantly, if the python program dies, the inotifywatch will get
a SIGPIPE when it writes and then almost assuredly crash itself. You could
kill the python program and see.
--
sent from a rotar
Hi all,
I'm making a thumb drive automounter using inotifywait piped into my
Python program, which detects the proper CREATES and DELETES and
automounts and autoumounts accordingly.
Here's what I thought the run script would look like (runit dialect):
#!/bin/sh
exec /usr/bin/inotifywait /dev/dis