Re: Supervising a pipeline?

From: fREW Schmidt <>
Date: Sat, 26 Dec 2015 09:24:04 -0800

Two things:

I'm not at a computer but I'm *pretty* sure exec foo | bar doesn't work

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 rotary phone, pardon my brevity
On Dec 26, 2015 11:07 AM, "Steve Litt" <> wrote:
> 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/disk | /usr/local/bin/
> However, it was pointed out to me that if crashed,
> inotifywait would keep spinning and shooting its voluminous stdout
> messages into the ether. And presumably the service wouldn't crash and
> restart.
> Is this doable in a way consistent with supervision suites?
> I completely understand that 95% of you think what I've suggested is a
> no-style kludge that shouldn't be done, and that I should use Python's
> inotify framework. This is a completely different discussion: I'm
> limiting my question to whether such a pipeline is, or can be made,
> consistent with things like daemontools-encore, s6, and runit.
> Thanks,
> SteveT
> Steve Litt
> November 2015 featured book: Troubleshooting Techniques
>      of the Successful Technologist
Received on Sat Dec 26 2015 - 17:24:04 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC