RE: [XFree86] xlib: howto detect x killed

2003-02-17 Thread Nick Shrake
Type: ps -ef

View the process then if you're root you can kill it if it's running (I
doubt it!)

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On
Behalf Of bitlov
Sent: Monday, February 17, 2003 3:14 PM
To: [EMAIL PROTECTED]
Subject: [XFree86] xlib: howto detect x killed

How to detect that the X server has been killed or stopped ?

My program that use a window with the override_redirect flag set crashs
when
sending x request to a dead X server. I have tried to detect dead X with
XSetErrorHandler() and XSetIOErrorHandler() but the handlers are never
called.
Please help.
Thanks
Bitlov


_
Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
http://www.ifrance.com/_reloc/m la 1ère messagerie instantanée de France

___
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86

___
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86



RE: [XFree86] xlib: howto detect x killed

2003-02-18 Thread Dr Andrew C Aitchison
On Mon, 17 Feb 2003, Nick Shrake wrote:

> Type: ps -ef
> 
> View the process then if you're root you can kill it if it's running (I
> doubt it!)

If you started it you can kill -HUP the Xserver even if you aren't root.
(Not actually killing it, just asking it to die, but it obeys).

-- 
Dr. Andrew C. Aitchison Computer Officer, DPMMS, Cambridge
[EMAIL PROTECTED]   http://www.dpmms.cam.ac.uk/~werdna

___
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86



Re: [XFree86] xlib: howto detect x killed

2003-02-18 Thread bitlov
No the problem is that when my program try to draw something in the window
of a stopped/killed xserver, it crashs. It is impossible to test if the
xserver is alive before any drawing primitive. I just would like to get an
event that the communication with the xserver is broken instead of a big
crash while I send a request to the xserver.
Bitlov


> Type: ps -ef
>
> View the process then if you're root you can kill it if it's running (I
> doubt it!)
>
> -Original Message-
> How to detect that the X server has been killed or stopped ?
>
> My program that use a window with the override_redirect flag set crashs
> when
> sending x request to a dead X server. I have tried to detect dead X with
> XSetErrorHandler() and XSetIOErrorHandler() but the handlers are never
> called.
> Please help.
> Thanks
> Bitlov



_
Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
http://www.ifrance.com/_reloc/m la 1ère messagerie instantanée de France

___
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86