projects
/
invirt/third/libt4.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cosmetic changes
[invirt/third/libt4.git]
/
lock_smain.cc
diff --git
a/lock_smain.cc
b/lock_smain.cc
index
2c9828b
..
64f7985
100644
(file)
--- a/
lock_smain.cc
+++ b/
lock_smain.cc
@@
-1,19
+1,12
@@
#include "lock_server.h"
#include "lock_server.h"
-#include <arpa/inet.h>
-#include <unistd.h>
-
-// Main loop of lock_server
-
-char log_thread_prefix = 's';
int main(int argc, char *argv[]) {
int main(int argc, char *argv[]) {
+ global = new t4_state('s');
setvbuf(stdout, NULL, _IONBF, 0);
setvbuf(stderr, NULL, _IONBF, 0);
setvbuf(stdout, NULL, _IONBF, 0);
setvbuf(stderr, NULL, _IONBF, 0);
- srandom((uint32_t)getpid());
-
if(argc != 3){
if(argc != 3){
- LOG_NONMEMBER("Usage: " << argv[0] << " [master:]port [me:]port");
+ LOG_NONMEMBER << "Usage: " << argv[0] << " [master:]port [me:]port";
exit(1);
}
exit(1);
}
@@
-23,5
+16,5
@@
int main(int argc, char *argv[]) {
rsm.start();
while(1)
rsm.start();
while(1)
- sleep(1000);
+ std::this_thread::sleep_for(milliseconds(1000));
}
}