diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2019-06-14 17:55:14 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2020-10-15 11:14:53 +0200 |
commit | 9f9c5365816bdd036fd80d54b22e86764ea4b7a7 (patch) | |
tree | fc1ed95b7455c5af6787219aef2c0b2acbdbfbac /man | |
parent | 4cb758019e374fa7c022fe79d28444e13441717b (diff) | |
download | xorg-lib-libX11-9f9c5365816bdd036fd80d54b22e86764ea4b7a7.tar.gz |
Add XSetIOErrorExitHandler() function
This function complements XSetIOErrorHandler(), allowing to override
the default behavior that trusts on I/O errors never coming back
(i.e. exit()ing the process).
This is meant as a mechanism for Wayland compositors (that are too
a X11 client + compositing manager) to unfasten seatbelts and jump
through the car window. It might get lucky and land on a stack of
pillows.
In consequence, some functions labeled as _X_NORETURN can as a
matter of fact return. So those hints were removed.
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Diffstat (limited to 'man')
-rw-r--r-- | man/XSetErrorHandler.man | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/man/XSetErrorHandler.man b/man/XSetErrorHandler.man index 6ab5ae46..2f30420f 100644 --- a/man/XSetErrorHandler.man +++ b/man/XSetErrorHandler.man @@ -47,7 +47,7 @@ .ds xC Inter-Client Communication Conventions Manual .TH XSetErrorHandler __libmansuffix__ __xorgversion__ "XLIB FUNCTIONS" .SH NAME -XSetErrorHandler, XGetErrorText, XDisplayName, XSetIOErrorHandler, XGetErrorDatabaseText \- default error handlers +XSetErrorHandler, XGetErrorText, XDisplayName, XSetIOErrorHandler, XSetIOErrorExitHandler, XGetErrorDatabaseText \- default error handlers .SH SYNTAX .HP int (*XSetErrorHandler\^(\^int (\^*\^\fIhandler\fP\^)\^(Display *, XErrorEvent @@ -61,6 +61,10 @@ char *XDisplayName\^(\^_Xconst char *\fIstring\fP\^); int (*XSetIOErrorHandler\^(\^int (\^*\^\fIhandler\fP\^)(Display *)\^)\^)\^(\^); .HP +void (*XSetIOErrorExitHandler\^(Display +*\fIdisplay\fP\^, void (\^*\^\fIhandler\fP\^)(Display *, void +*)\^, void *\fIuser_data\fP)\^)\^(\^); +.HP int XGetErrorDatabaseText\^(\^Display *\fIdisplay\fP\^, _Xconst char *\fIname\fP, _Xconst char *\fImessage\fP\^, _Xconst char *\fIdefault_string\fP\^, char *\fIbuffer_return\fP\^, int \fIlength\fP\^); @@ -136,9 +140,11 @@ sets the fatal I/O error handler. Xlib calls the program's supplied error handler if any sort of system call error occurs (for example, the connection to the server was lost). This is assumed to be a fatal condition, -and the called routine should not return. +and the called routine should normally not return. If the I/O error handler does return, -the client process exits. +the client process exits by default, this behavior may be altered with the +.BR XSetIOErrorExitHandler +function. .LP Note that the previous error handler is returned. .LP |