Exemplo n.º 1
0
 void signalProcessingThread() {
     while (true) {
         int actualSignal = 0;
         int status = sigwait( &asyncSignals, &actualSignal );
         fassert(16779, status == 0);
         switch (actualSignal) {
         case SIGUSR1:
             // log rotate signal
             fassert(16780, rotateLogs());
             logProcessDetailsForLogRotate();
             break;
         default:
             // no one else should be here
             fassertFailed(16778);
             break;
         }
     }
 }
Exemplo n.º 2
0
 virtual bool run(const string& ns, BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool fromRepl) {
     bool didRotate = rotateLogs();
     if (didRotate)
         logProcessDetailsForLogRotate();
     return didRotate;
 }
 virtual bool run(OperationContext* txn, const string& ns, BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool fromRepl) {
     bool didRotate = rotateLogs(serverGlobalParams.logRenameOnRotate);
     if (didRotate)
         logProcessDetailsForLogRotate();
     return didRotate;
 }