> Hi all,
>
> I'm using the @filemon decorator in uWSGI 1.2 to monitor a card reader
> that
> writes information to a sysfs file. My code triggers properly when I
> monitor a normal file like /tmp/test.txt. It does not work when I monitor
> /sys/kernel/wiegand/read.
>
> Should @filemon work with sysfs?
>
> Is there a solution to this that is easier than modifying the card reader
> driver so that it writes to a normal file?
>
> Thanks,
> Brandon
> _______________________________________________
>

You cannot monitor pseudo-filesystems with inotify (it is a kernel limit,
not uWSGI limit).

The right approach (in my mind :P) is using an udev rule attached to
/sys/kernel/wiegand/read. This rule triggers a script in which you can
touch a file (not very elegant) or directly raise a signal in uWSGI
calling

uwsgi --signal 127.0.0.1:3031,1

(it will invoke signal 1 on instance 127.0.0.1:3031)

Obviously we can write a plugin using libudev directly in uWSGI, if you
want to invest money just drop me a mail ;)


-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to