stasis-bLSM/util/shutdown.cpp
sears b4f80aaa7d added shutdown utility
git-svn-id: svn+ssh://svn.corp.yahoo.com/yahoo/yrl/labs/pnuts/code/logstore@1002 8dad8b1f-cf64-0410-95b6-bcf113ffbcfe
2010-08-16 22:11:19 +00:00

29 lines
620 B
C++

/*
* shtudown.cpp
*
* Created on: Aug 16, 2010
* Author: sears
*/
#include "../tcpclient.h"
#include "../network.h"
#include "../datatuple.h"
void usage(char * argv[]) {
fprintf(stderr, "usage %s [host [port]]\n", argv[0]);
}
#include "util_main.h"
int main(int argc, char * argv[]) {
logstore_handle_t * l = util_open_conn(argc, argv);
datatuple * ret = logstore_client_op(l, OP_SHUTDOWN);
if(ret == NULL) {
perror("Shutdown failed."); return 3;
} else {
datatuple::freetuple(ret);
}
logstore_client_close(l);
printf("Shutdown in progress\n");
return 0;
}