- XSync(otk::OBDisplay::display, false);
-
- // this tends to block.. i honestly am not sure why. causing an x error in
- // the shutdown process unblocks it. blackbox simply did a ::exit(0), so
- // all im gunna do is the same.
- //otk::OBDisplay::destroy();
-
- if (_restart) {
- if (!_restart_prog.empty()) {
- const std::string &dstr =
- otk::OBDisplay::screenInfo(first_screen)->displayString();
- putenv(const_cast<char *>(dstr.c_str()));
- execlp(_restart_prog.c_str(), _restart_prog.c_str(), NULL);
- perror(_restart_prog.c_str());
- }
-
- // fall back in case the above execlp doesn't work
- execvp(_argv[0], _argv);
- execvp(otk::basename(_argv[0]).c_str(), _argv);
- }