/* * BoostTestClass.cpp * * Created on: Jan 28, 2011 * Author: root */ #include "BoostTestClass.h" boost::recursive_mutex BoostTestClass::monitoredProcessesMutex; BoostTestClass::BoostTestClass() { // TODO Auto-generated constructor stub } BoostTestClass::~BoostTestClass() { // TODO Auto-generated destructor stub } boost::recursive_mutex* BoostTestClass::getMonitoredProcessesMutex(){ return &monitoredProcessesMutex; } int main(){ BoostTestClass *boosttest = new BoostTestClass(); boosttest->getMonitoredProcessesMutex()->lock(); int pid = fork(); if (pid == 0){ exit(0); } boosttest->getMonitoredProcessesMutex()->unlock(); sleep(100); }