MIME-Version: 1.0 Date: Wed, 4 Mar 2015 18:40:35 -0700 Message-ID: From: Reinoud Koornstra Content-Type: multipart/alternative; boundary=001a1134bd8083306b051080a75c Subject: [Openvpn-devel] reading from the status file from another pid List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: openvpn-devel@lists.sourceforge.net --001a1134bd8083306b051080a75c Content-Type: text/plain; charset=UTF-8 Hi Everyone, I've configured openvpn to write the status every 5 seconds to a status file. Looking at the code that when openvpn starts you call open() Then every 5 seconds, the status file is truncated in status_flush. Only when you close openvpn, the file descriptor will be closed again. Hence, the file remains open all the time, but is truncated every 5 seconds. Now I would the read from the status file periodically as well in another process that is running. I can open the file just fine, the only issue that makes me incertain is the truncating of the file every 5 seconds. Currently I am looking for a safe way to read from the status file, while it is opened and truncated every 5 seconds. Any suggestions? Thanks, Reinoud. --001a1134bd8083306b051080a75c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Everyone,

I've configured openvp= n to write the status every 5 seconds to a status file.
Looking a= t the code that when openvpn starts you call open()

Then every 5 seconds, the status file is truncated in status_flush.
=

Only when you close openvpn, the file descriptor will b= e closed again.
Hence, the file remains open all the time, but is= truncated every 5 seconds.

Now I would the read f= rom the status file periodically as well in another process that is running= .
I can open the file just fine, the only issue that makes me inc= ertain is the truncating of the file every 5 seconds. Currently I am lookin= g for a safe way to read from the status file, while it is opened and trunc= ated every 5 seconds.
Any suggestions?
Thanks,

Reinoud.
--001a1134bd8083306b051080a75c--