Michael, Back in the dark ages of last century, I wrote a c-shell script that sent CAD plots to a plotter from two different CAD systems. I discovered that the file size started at zero and then grew to the final size. I would watch the files size and wait until it was stable for at least a minute. It was slow but it was automatic. We had to physically switch the plotter from one system to the other before this script. YMMV.
Regards, Ken On Fri, Dec 1, 2017 at 12:09 PM, michael <[email protected]> wrote: > 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 > _______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
