[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg
Subject:    =?gb2312?B?tPC4tDogtPC4tDogQSBxdWVzdGlvbiBhYm91dCBYT3BlbkRpc3BsYXkgZmE=?=
From:       "Ma, Qingyu (GE Healthcare)" <Qingyu.Ma () ge ! com>
Date:       2010-04-29 2:10:13
Message-ID: 64E1EBED52686A4189F71097E6E908AC07CBDE11 () SHAMLVEM03 ! e2k ! ad ! ge ! com
[Download RAW message or body]

> 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. But there is time slice between process execution and open display. It depends \
on my process. Except that DISPLAY is fixed for one process after it's executed.

> XOpenDisplay can also fail if:

> - you don't have currently valid authorization (either a good
> entry in the xauthority file for the display or a xhost entry
> allowing access to your host/userid - see the XSecurity man
> page for more info on the various authentication mechanisms)

> - DISPLAY specifies an invalid hostname

> - the X server is not running

This issue occurred after long time cycle test. Before it occurred, all function is \
perfect. That means, before the issue occurred, my process can open display \
successfully. Then, suddenly, open display fail. Can any condition cause this \
phenomena?


> - the X server has hit it's maximum number of open connections,
> such as if you called XOpenDisplay() every time you wanted to
> change an LED, and never called XCloseDisplay()

I checked my code. XOpenDisplay() and XCloseDisplay() always be executed with a pair. \
And, if I indeed missed one XCloseDisplay(), there should be regulated occurrence in \
cycle test. But acutally not.

Best Regards,
Ma Qingyu

-----ÓʼþÔ­¼þ-----
·¢¼þÈË: Alan Coopersmith [mailto:alan.coopersmith@oracle.com] 
·¢ËÍʱ¼ä: 2010Äê4Ô 28ÈÕ 22:28
ÊÕ¼þÈË: Ma, Qingyu (GE Healthcare)
³­ËÍ: Peter Hutterer; xorg@lists.freedesktop.org
Ö÷Ìâ: Re: ´ð¸´: A question about XOpenDisplay fail

Ma, Qingyu (GE Healthcare) wrote:
> Thanks for your reply.
> 
> My process is executed in a script which is executed by another process. The script \
> is like: 
> export DISPLAY=:0.1
> ./myProcess &
> export  DISPLAY=:0.0
> 
> I know when myProcess opens display, current DISPLAY maybe changed back to :0.0.  \
> It's another issue. But till now, myProcess is displayed on :0.1 each time. Of \
> course, I'm not sure if myProcess try to open display at the right point of \
> changing DISPLAY, whether it can get a valid display (0 or 1)?

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.

> Is there any other possibility to cause XOpenDisplay fail, like network, IP stack \
> or anything?

XOpenDisplay can also fail if:

 - you don't have currently valid authorization (either a good
   entry in the xauthority file for the display or a xhost entry
   allowing access to your host/userid - see the XSecurity man
   page for more info on the various authentication mechanisms)

 - DISPLAY specifies an invalid hostname

 - the X server is not running

 - the X server has hit it's maximum number of open connections,
   such as if you called XOpenDisplay() every time you wanted to
   change an LED, and never called XCloseDisplay()

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

_______________________________________________
xorg@lists.freedesktop.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.freedesktop.org/mailman/listinfo/xorg


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic