[seahorse] ssh: Add IOCondition.HUP To Channels



commit 57f833339a63576469a5bf57a7b8eaebb78490fd
Author: Tim Way <18104-timway users noreply gitlab gnome org>
Date:   Wed Jul 1 17:14:55 2020 -0500

    ssh: Add IOCondition.HUP To Channels
    
    It's possible by not handling a HUP we're left in an infinite state.
    
    https://wiki.gnome.org/Projects/Vala/IoChannelsSample

 ssh/operation.vala | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/ssh/operation.vala b/ssh/operation.vala
index 6efb7e17..69f56c0a 100644
--- a/ssh/operation.vala
+++ b/ssh/operation.vala
@@ -94,14 +94,14 @@ public abstract class Operation : GLib.Object {
         if (input != null) {
             StringBuilder std_in = new StringBuilder(input);
             debug("Sending input to '%s': '%s'", this.command_name, std_in.str);
-            create_io_channel(std_in, fin, IOCondition.OUT,
+            create_io_channel(std_in, fin, IOCondition.OUT | IOCondition.HUP,
                               (io, cond) => on_io_ssh_write(io, cond, std_in));
         }
 
         // Make all the proper IO Channels for the output/error
-        create_io_channel(this.std_out, fout, IOCondition.IN,
+        create_io_channel(this.std_out, fout, IOCondition.IN | IOCondition.HUP,
                           (io, cond) => on_io_ssh_read(io, cond, this.std_out));
-        create_io_channel(this.std_err, ferr, IOCondition.IN,
+        create_io_channel(this.std_err, ferr, IOCondition.IN | IOCondition.HUP,
                           (io, cond) => on_io_ssh_read(io, cond, this.std_err));
 
         // Process watch


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