[comp.windows.x] Handling Errors w/ Multiple Connections

stripes@wam.UMD.EDU (05/24/89)

  I've been having a problem handleing "fatal" errors (like having the
client killed by the window manager).  The application could handle the
loss of a display connection (each connection is to a diffrent display),
but there is no way to recover from such errors, my documation says
that a handler set by XSetIOErrorHandler() can not return.  The best
way (that I have come up with) around it is to fork off a new process and
re-open the other connections, but that is a gross kludge at best.  Does anyone
else have a better kludge?  Should a KillClient cause an IO error, or is
this a bug in DEC's (not MIT's) X11R2 server?  Is there going to be a better
way to recover from such errors in future revisions of X?  Thanks for your
time...
-- 
           stripes@wam.umd.edu
      Josh_Osborne@Real_World,The
      "The dyslexic porgramer"
        "Bones, help this man, He's hurt!"
         "Dammit, Jim, I'm a DOCTOR, not a.... Oh, yeah."

rws@EXPO.LCS.MIT.EDU (05/24/89)

    Should a KillClient cause an IO error, or is
    this a bug in DEC's (not MIT's) X11R2 server?

KillClient will cause an IO error.

    Is there going to be a better
    way to recover from such errors in future revisions of X?

"Recover" is an undefined term.  Without understanding the requirements for
recovery, and how universal they are, it's not prudent to design a mechanism to
handle it.  I've seen no attempts to establish requirements in this area.

stripes@wam.UMD.EDU (05/25/89)

In article <8905241312.AA00893@expire.lcs.mit.edu> rws@EXPO.LCS.MIT.EDU writes:
>"Recover" is an undefined term.  Without understanding the requirements for
>recovery, and how universal they are, it's not prudent to design a mechanism to
>handle it.  I've seen no attempts to establish requirements in this area.

  All the "recovery" I want is to be able to continue useing the OTHER
connections, which have had no IO errors.  As an example think about a Xclient
that allows more then 2 users to "talk" to each other, this client opens one
connection to the display of each person invovled.  With the current handleing
of XKillClient, and IO errors if one user kills his talk with a window manager
insted of exiting the application it will kill EVERYONE's talk.
  If the client could continue to use the other displays it could react as if
the user had quit, insted of dissapearing from the displays of all the other
users (with no explination).
-- 
           stripes@wam.umd.edu
      Josh_Osborne@Real_World,The
      "The dyslexic porgramer"

rws@EXPO.LCS.MIT.EDU (05/26/89)

    All the "recovery" I want is to be able to continue useing the OTHER
    connections, which have had no IO errors.

Have you tried using setjmp, and a longjmp in your IO error handler?