Hello pluggers,

I need to use DBus on a Raspberry Pi 3 running Raspbian Stretch to synchronize the reading and writing of a PNG file. One program writes the graphics file, the other program needs to read it. File locking is cumbersome, how do you make sure that the the writer gets a lock before the reader does? If only the writer could talk to the reader before the reader grabs the file. The writer should indicate whether or not the file is ready to be read or maybe the file is still being written. Maybe the camera is still snapping a picture. In theory, if the programs communicate with each other there
is no need for file system level locks.

Problem, the 2005 Linux Journal article that shows a way to use DBus does not compile. The original dbus is apparently
too low level and evidently it is deprecated.  Ouch!

I'm trying to write a C program to go between the writer and the reader and communicate with both of them concerning the file in question using UNIX sockets, but that seems like overkill and far more involved than I had hoped it would be.

Please help! I have twelve days left to address this synchronization issues. I can't replace the 6k lines of C code that comprise the writer of the PNG file in twelve days, it isn't documented at all hardly.
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to