33 pPostMaster(0), pFileTimer(0)
44 log->
Debug(
UtilityMsg,
"Running the prepare fork handler for process %d",
55 log->
Debug(
UtilityMsg,
"Locking File and FileSystem objects for process: "
58 std::set<FileStateHandler*>::iterator itFile;
59 for( itFile = pFileObjects.begin(); itFile != pFileObjects.end();
63 std::set<FileSystem*>::iterator itFs;
64 for( itFs = pFileSystemObjects.begin(); itFs != pFileSystemObjects.end();
76 log->
Debug(
UtilityMsg,
"Running the parent fork handler for process %d",
82 std::set<FileStateHandler*>::iterator itFile;
83 for( itFile = pFileObjects.begin(); itFile != pFileObjects.end();
87 std::set<FileSystem*>::iterator itFs;
88 for( itFs = pFileSystemObjects.begin(); itFs != pFileSystemObjects.end();
105 pid_t pid = getpid();
106 log->
Debug(
UtilityMsg,
"Running the child fork handler for process %d",
110 "process: %d", pid );
112 std::set<FileStateHandler*>::iterator itFile;
113 for( itFile = pFileObjects.begin(); itFile != pFileObjects.end();
116 (*itFile)->AfterForkChild();
120 std::set<FileSystem*>::iterator itFs;
121 for( itFs = pFileSystemObjects.begin(); itFs != pFileSystemObjects.end();
130 pPostMaster->
Start();
static Log * GetLog()
Get default log.
void Lock()
Lock the task.
void UnLock()
Un-lock the task.
void Parent()
Handle the parent post-fork.
void Prepare()
Handle the preparation part of the forking process.
void Child()
Handler the child post-fork.
void Debug(uint64_t topic, const char *format,...)
Print a debug message.
bool Start()
Start the post master.
bool Finalize()
Finalizer.
bool Stop()
Stop the postmaster.
TaskManager * GetTaskManager()
Get the task manager object user by the post master.
bool Initialize()
Initializer.
void RegisterTask(Task *task, time_t time, bool own=true)
const uint64_t UtilityMsg