[vte/vte-0-48] pty: spawn: Always fill in the GError on failure
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-0-48] pty: spawn: Always fill in the GError on failure
- Date: Tue, 25 Apr 2017 21:09:55 +0000 (UTC)
commit 1e6071305c34cb3b5ea0548c7b01710492acd55e
Author: Christian Persch <chpe src gnome org>
Date: Tue Apr 25 23:06:13 2017 +0200
pty: spawn: Always fill in the GError on failure
(cherry picked from commit d2e38f44ec644f94e79f6aa923da5b57601a47df)
src/pty.cc | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/pty.cc b/src/pty.cc
index 5006cc7..646a4e0 100644
--- a/src/pty.cc
+++ b/src/pty.cc
@@ -364,8 +364,15 @@ __vte_pty_spawn (VtePty *pty,
GError *err = NULL;
GPollFD pollfd;
- if (cancellable && !g_cancellable_make_pollfd(cancellable, &pollfd))
+ if (cancellable && !g_cancellable_make_pollfd(cancellable, &pollfd)) {
+ vte::util::restore_errno errsv;
+ g_set_error(error,
+ G_IO_ERROR,
+ g_io_error_from_errno(errsv),
+ "Failed to make cancellable pollfd: %s",
+ g_strerror(errsv));
return FALSE;
+ }
spawn_flags |= G_SPAWN_DO_NOT_REAP_CHILD;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]