[gnome-builder] pipeline: don't pass cancellable to pty creation



commit 615b8087ee4afd67c18ecaac743a45f4f74d1e2e
Author: Christian Hergert <chergert redhat com>
Date:   Thu Jan 18 18:50:56 2018 -0800

    pipeline: don't pass cancellable to pty creation
    
    Creating a PTY with a cancellable will fail due to lower levels complaining
    about socket initialization with cancellables. This works around it by
    ensuring we don't propagate the cancellable to vte_pty_new_sync().

 src/libide/buildsystem/ide-build-pipeline.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/libide/buildsystem/ide-build-pipeline.c b/src/libide/buildsystem/ide-build-pipeline.c
index f8a9823f1..21b24a491 100644
--- a/src/libide/buildsystem/ide-build-pipeline.c
+++ b/src/libide/buildsystem/ide-build-pipeline.c
@@ -1053,11 +1053,15 @@ ide_build_pipeline_initable_init (GInitable     *initable,
 
   g_assert (IDE_IS_BUILD_PIPELINE (self));
   g_assert (IDE_IS_CONFIGURATION (self->configuration));
+  g_assert (!cancellable || G_IS_CANCELLABLE (cancellable));
 
-  /* Create a PTY for subprocess launchers */
-  self->pty = vte_pty_new_sync (VTE_PTY_DEFAULT, cancellable, error);
+  /*
+   * Create a PTY for subprocess launchers. PTY initialization does not
+   * support cancellation, so do not pass @cancellable along to it.
+   */
+  self->pty = vte_pty_new_sync (VTE_PTY_DEFAULT, NULL, error);
   if (self->pty == NULL)
-    return FALSE;
+    IDE_RETURN (FALSE);
 
   g_signal_connect_object (self->configuration,
                            "notify::ready",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]