I'm unsure of the reasons for the change. Instead of setting DISPLAY and SUGAR_EMULATOR_PID environment variables repeatedly for each attempt to run Xephyr, set the variables once.
This would be effective in reducing CPU cost if there is contention in display numbers. Further efficiency during contention could also be gained by factoring much of _run_xephyr; there are many other steps there that might be done only once. Further readability might be gained by considering _setup_env. It sets environment variables that will be available to the Xephyr process, though I can't see a need for them there. Perhaps all environment variables could be moved there, and the display and pipe passed to it. Not tested. Reviewed-by: James Cameron <qu...@laptop.org> -- James Cameron http://quozl.linux.org.au/ _______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel