[cvsnt] Check if no user if connected
Bo Berglund
Bo.Berglund at system3r.se
Tue May 11 15:43:02 BST 2004
CVS does not keep a "connection" so there are no connected users and there
is no no-mans land to be left in...
What happens is that *every* time a cvs client sends a command to the server
it will also send user authentication that is used for that single command.
When the command is done there is noone connected at all.
So what you are looking for are very transient appearances of cvs.exe in the
process list. Typically a cvs transaction lasts for maybe a second or slightly
longer, then it is gone again.
If you stop CVS in the middle of a longer transaction then that is aborted with
no ill effects normally.
But if you can check on the process list first for cvs.exe then you are pretty
much on the safe side.
Bo
-----Original Message-----
From: cvsnt-bounces at cvsnt.org [mailto:cvsnt-bounces at cvsnt.org]On Behalf
Of Mathew Plattz
Sent: den 11 maj 2004 04:26
To: cvsnt at cvsnt.org
Subject: [cvsnt] Check if no user if connected
I'm writing a script to do a nightly CVS backup (into zipped package).
It will be pretty simple
//first check that no one is connected and using it.
net stop cvsnt
rar.exe -blah $date.rar
net start cvsnt
+some error checking/feedback.
Thats basically it. How do I check if no one is connected to it? Don't
want to stop the Service is someone is doing an update....(even though this
will be sheduled to run at midnight, I'd like to check...) If someone is
connected, I plan on just waiting 5 minutes, then retrying indefinately.
Also, is it possible to stop the CVS, but keep CVS server running to send
back a specific error message to the user? Instead of completely stopping
CVS and leave anyone who connects in no-mans-land, It would be nice if I
could 'disable' the server, but if anyone tries to connect, it denies then
and just says "Server is down for Maintainence, please try again in 10
minutes". Is this possible?
Thank you very much.
_________________________________________________________________
Impossible is not a fact, it's an opinion. Have your say! Check out the
inspiring stories at http://www.adidas.com.au/impossible We dare you.
_______________________________________________
cvsnt mailing list
cvsnt at cvsnt.org
http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt
More information about the cvsnt
mailing list