[glib] GCancellable: Make eventfd() fall back to pipes on EINVAL too
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] GCancellable: Make eventfd() fall back to pipes on EINVAL too
- Date: Sun, 10 Jul 2011 16:19:34 +0000 (UTC)
commit 182ed958618a098895eb07959c0fb77eb5dcd13c
Author: Colin Walters <walters verbum org>
Date: Sun Jul 10 12:19:15 2011 -0400
GCancellable: Make eventfd() fall back to pipes on EINVAL too
https://bugzilla.gnome.org/show_bug.cgi?id=654232
gio/gcancellable.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gio/gcancellable.c b/gio/gcancellable.c
index f5cfdd9..2974663 100644
--- a/gio/gcancellable.c
+++ b/gio/gcancellable.c
@@ -249,9 +249,11 @@ g_cancellable_open_pipe (GCancellable *cancellable)
g_cancellable_write_cancelled (cancellable);
return;
}
- else if (errno != ENOSYS)
- return;
- /* Fall through on ENOSYS */
+ else if (!(errno == ENOSYS || errno == EINVAL))
+ {
+ return;
+ }
+ /* Fall through on ENOSYS or EINVAL */
#endif
if (g_unix_open_pipe (priv->cancel_pipe, FD_CLOEXEC, NULL))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]