[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg
Subject: =?gb2312?B?tPC4tDogQSBxdWVzdGlvbiBhYm91dCBYT3BlbkRpc3BsYXkgZmFpbA==?=
From: "Ma, Qingyu (GE Healthcare)" <Qingyu.Ma () ge ! com>
Date: 2010-04-28 11:34:36
Message-ID: 64E1EBED52686A4189F71097E6E908AC07CBDAA6 () SHAMLVEM03 ! e2k ! ad ! ge ! com
[Download RAW message or body]
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)?
Is there any other possibility to cause XOpenDisplay fail, like network, IP stack or \
anything?
Best Regards,
Ma Qingyu
-----ÓʼþÔ¼þ-----
·¢¼þÈË: Peter Hutterer [mailto:peter.hutterer@who-t.net]
·¢ËÍʱ¼ä: 2010Äê4Ô 28ÈÕ 19:18
ÊÕ¼þÈË: Ma, Qingyu (GE Healthcare)
³ËÍ: xorg@lists.freedesktop.org
Ö÷Ìâ: Re: A question about XOpenDisplay fail
On Wed, Apr 28, 2010 at 02:50:50PM +0800, Ma, Qingyu (GE Healthcare) wrote:
> Hello,
>
> During my developing work, I meet a problem about XOpenDisplay. Could
> you please give me some consult?
please don't cross-post. taking xorg-devel off the CC list.
> I'm developing a system, which uses fvwm as WM. Two fvwm are executed
> to implement two separated screens. My process is displayed on one
> screen(DISPLAY). It calls XOpenDisplay(NULL) to get one Display
> connection to be used as display image, and another Display to be used
> as toggle keyboard led (whenever keyboard led state is changed, a new
> Display is opened and closed). The function is OK. But when I was
> doing monkey and cycle test, there is a very very little possibility
> that my process may crash. I looked through my code, and found a bug
> which was that I didn't check the return value of XOpenDisplay, and
> use it directly . I have checked that a NULL Display will cause
> process crash in following code. It's just my analysis and guess, I'm
> not sure whether it does be the root cause. And, by now, the cycle and
> monkey cannot re-occur the issue.
>
> So, I want to get some information from you to help to reach the root
> cause. What will cause XOpenDisplay return NULL? How can I simulate
> the case?(When my process is executed, I'm sure the XWindow and fvwm
> have been booted up.)
XOpenDisplay on an invalid display will return NULL. so you can either specify an \
invalid display in the code directly or through your DISPLAY environment variable.
DISPLAY=:10 your-program-name
should fail, unless you really have an X server on display 10 which is rather \
unlikely.
Cheers,
Peter
_______________________________________________
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