void UserTable::FinishDone() { pid_t res = 0; int status = 0; while ((res = waitpid(-1, &status, WNOHANG)) > 0) { ClearProcess(res); } }
void UserTable::ClearProcesses() { int status = 0; PROC_MAP::iterator it = s_procMap.begin(); while (it != s_procMap.end()) { if (waitpid(it->first, &status, WNOHANG) > 0) { ClearProcess(it->first); } it++; } }
void CNetworkMonitorBox::OnOK() { BOOL bCheck = ! m_wndStart.GetCheck(); m_wndStart.SetWindowText( bCheck ? "ÔÝÍ£" : "Ö´ÐÐ" ); int nIcon = CoolInterface.ImageForID( bCheck ? ID_NETWORK_DISCONNECT : ID_NETWORK_CONNECT ); m_wndStart.SetIcon( CoolInterface.m_pImages.ExtractIcon( nIcon ) ); if ( bCheck ) { m_wndClock.SetStyle( CEDClock::EClockStyle::XDC_NORMAL ); } else { m_wndClock.SetStyle( CEDClock::EClockStyle::XDC_FLOWBACK, 0 ); ClearProcess( NULL ); } m_wndStart.SetCheck( bCheck ); }