fCondition.Signal();
}
+//______________________________________________________________________________________________
+void AliShuttleTrigger::CheckTerminate()
+{
+ //
+ // Checks if the Shuttle got an external terminate request by a created file
+ // This is an alternative to the signal which causes problems with the API libraries
+ //
+
+ if (strlen(fConfig->GetTerminateFilePath()) == 0)
+ return;
+
+ if (gSystem->AccessPathName(fConfig->GetTerminateFilePath()) == kFALSE)
+ {
+ AliInfo("Terminate file exists. Terminating Shuttle...");
+ fTerminate = kTRUE;
+ }
+}
+
//______________________________________________________________________________________________
void AliShuttleTrigger::Run() {
//
while (!(fNotified || fTerminate)) {
received=fCondition.TimedWaitRelative(1000*fConfig->GetTriggerWait());
+ CheckTerminate();
if (received==1) break; // 1 = timeout
}
}
Collect();
+ CheckTerminate();
}
delete notifier;
gSystem->GetFsInfo(fConfig->GetShuttleFileSystem(), &id, &bsize, &blocks, &bfree);
- AliInfo(Form("n. of free blocks = %d, total n. of blocks = %d",bfree,blocks));
+ AliInfo(Form("n. of free blocks = %ld, total n. of blocks = %ld",bfree,blocks));
Int_t spaceFree = (Int_t)(((Float_t)bfree/(Float_t)blocks)*100);
if (spaceFree < fConfig->GetFreeDiskWarningThreshold()) {