int main(){ cout << "Starting GUI..." << endl; string systemdrive = get_env("SYSTEMDRIVE"); GDSPath = systemdrive + GDSPath; WMPath = systemdrive + WMPath; ShellPath = systemdrive + ShellPath; Process proc = Process::Spawn(GDSPath, {WMPath, ShellPath}); proc.Wait(); Terminal term; term.SetPointerVisibility(false); term.SetPointerAutohide(true); cout << "Ending remaining GUI processes..."; cout.flush(); bool found = true; while(found){ found = false; ifstream procinfostream(ProcInfoPath); table procs = parsecsv(procinfostream); for(auto row: procs.rows){ if(strtoul(row["parent"].c_str(), NULL, 0) == bt_getpid()){ bt_kill(strtoul(row["PID"].c_str(), NULL, 0)); found = true; } } } cout << "Done." << endl; }