[cvsnt] CVSNT reuses same PID....

Bo Berglund bo.berglund at telia.com
Tue Dec 17 00:44:29 GMT 2002

Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.

Now I just want to have someone tip me on how to differentiate between
different cvs invocations of the loginfo script. What CVSNT does is
start a cvs.exe process when the user sends in a commit. Then this cvs
process loops through all submodules and calls the loginfo script
repeatedly. I want to collect all of this output in a single message,
so I create a temp dir where I store it for a short period until the
last call is done. The temp dir name is derived from the PID of the
main cvs.exe process as retrieved via $CVSPID.

I assumed that this would be fairly unique and could be relied on for
safekeeping, but now I have discovered that the PID seems to be reused
in a very short time span. Example:
Select a submodule and tag it.
Then go up to the top level and again issue the tag command, keeping
the same tag string. This can be done within seconds and is really two
different invocations from the user side. But the problem is that in
my tests the PID turns out to be the same as before. So now I have two
different commands saving data into the same temp dir and temp files.
No good...

Does someone have any idea on how I can fix this problem? I really
need a way to find out from the program launched in the loginfo script
which original command it belongs to. The PID is not enough and
tacking the user login to it will only partially help since in my
example above the problem appears also when one and the same user
issues the cvs command in rapid succession.

Is there a way for the cvsservice to create a GUID or something and
send it along to the cvs.exe when it starts processing the user
command? If so could this GUID be put into a new variable accessible
from the loginfo script??

Any help appreciated!

(Bo Berglund, developer in Sweden)

More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook