答复: 答复: A question about XOpenDisplay fail

Alan Coopersmith alan.coopersmith at oracle.com
Wed Apr 28 20:12:11 PDT 2010


Ma, Qingyu (GE Healthcare) wrote:
>> export/setenv only affect processes started from the shell after the command is
>> run.   Since myProcess is already running, the second export cannot affect it.
> 
> My understanding is when my process call XOpenDisplay(NULL), current DISPLAY will be used. 

Environment variables are passed from the shell to the process when the process
is started.   Once it's started, further changes in the shell cannot change the
variables the process sees.   This has nothing to do with XOpenDisplay, but is
simply how environment variables work in all Unix processes - getenv() is the
same way.

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System




More information about the xorg mailing list