diff options
author | Christian Persch <chpe@src.gnome.org> | 2017-04-25 23:06:13 +0200 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2017-04-25 23:09:01 +0200 |
commit | d2e38f44ec644f94e79f6aa923da5b57601a47df (patch) | |
tree | 50ea02c4bb6e48ae013ac25113dafc731ccbddba | |
parent | 92da93ab5aa8ee32335dfb14aacd3597823a103f (diff) | |
download | vte-d2e38f44ec644f94e79f6aa923da5b57601a47df.tar.gz |
pty: spawn: Always fill in the GError on failure
-rw-r--r-- | src/pty.cc | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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; |