[PATCH v2] inotifyd: -x: new option

Bartosz Gołaszewski bartekgola at gmail.com
Sat Oct 24 19:22:04 UTC 2015


2015-10-24 4:26 GMT+02:00 Denys Vlasenko <vda.linux at googlemail.com>:
> On Fri, Oct 23, 2015 at 3:14 PM, Bartosz Gołaszewski
> <bartekgola at gmail.com> wrote:
>>>> Like
>>>> for example being able to redirect the events to stdout instead of
>>>> only being able to pass them as arguments to PROG? This is how
>>>> inotifywait works BTW.
>>>
>>> It already does that:
>>>
>>> BusyBox v1.25.0.git (2015-10-19 04:25:25 CEST) multi-call binary.
>>>
>>> Usage: inotifyd PROG FILE1[:MASK]...
>>>
>>> Run PROG on filesystem changes.
>>> When a filesystem event matching MASK occurs on FILEn,
>>> PROG ACTUAL_EVENTS FILEn [SUBFILE] is run.
>>> If PROG is -, events are sent to stdout.
>>> ^^^^^^^^^^^^^^^^^^^^^^^^^
>>>
>>> # inotifyd - /etc:r
>>> r    /etc
>>> r    /etc    ld.so.cache
>>> r    /etc    ld.so.cache
>>> r    /etc    ld.so.cache
>>> r    /etc    ld.so.cache
>>> r    /etc    ld.so.cache
>>> r    /etc    magic
>>> r    /etc    bashrc
>>> r    /etc    bashrc
>>> ...
>>
>> Indeed, I forgot.
>>
>> Just to clarify - is it a definite no to the patch?
>
> I want to help you by looking at actual setup you want to speed up.

This is not speeding anything up - it's rather to have an elegant
process startup. I start several processes that need xserver to be
running (fail if the xserver socket is not present). The start-up
scripts start inotifyd to wait for the socket to appear and then
continue the execution immediately. Otherwise I'd have to loop the
process execution until they don't fail to start.

> By seeing your problem, I might be convinced that your solution
> is indeed necessary ;)

I don't like the idea of a shim script killing inotifyd - its parent -
that's all. It would be nice to have this functionality if it doesn't
increase the default size (it's n by default in Kconfig). Additionally
if you would have the shim script drop privileges for any reason (I
know it's unlikely ;)) it would fail to signal inotifyd.

-- 
Best regards,
Bartosz Golaszewski


More information about the busybox mailing list