[Sugar-devel] [PATCH] Set the DISPLAY env var once Xephyr has been launched

James Cameron quozl at laptop.org
Wed May 19 17:15:08 EDT 2010


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 <quozl at laptop.org>

-- 
James Cameron
http://quozl.linux.org.au/


More information about the Sugar-devel mailing list