[seahorse/wip/nielsdg/posix-sigterm-deprecated] ssh: Don't use deprecated Posix.SIGTERM



commit ea297946f4f51ed4a0e079edef90a27e2edb518c
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Mon Jan 7 21:41:28 2019 +0100

    ssh: Don't use deprecated Posix.SIGTERM
    
    The proper way (starting from valac 0.40) is `Posix.Signal.TERM`.

 ssh/operation.vala | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/ssh/operation.vala b/ssh/operation.vala
index 5608e3cb..11e11c47 100644
--- a/ssh/operation.vala
+++ b/ssh/operation.vala
@@ -81,7 +81,7 @@ public abstract class Operation : GLib.Object {
 
         ulong cancelled_sig = 0;
         if (cancellable != null)
-            cancelled_sig = cancellable.connect(() =>  { Posix.kill(this.pid, Posix.SIGTERM); });
+            cancelled_sig = cancellable.connect(() =>  { Posix.kill(this.pid, Posix.Signal.TERM); });
 
         // Copy the input for later writing
         if (input != null) {
@@ -141,7 +141,7 @@ public abstract class Operation : GLib.Object {
             }
         } catch (GLib.Error e) {
             critical("Couldn't read output of SSH command. Error: %s", e.message);
-            Posix.kill(this.pid, Posix.SIGTERM);
+            Posix.kill(this.pid, Posix.Signal.TERM);
             return false;
         }
 
@@ -159,7 +159,7 @@ public abstract class Operation : GLib.Object {
             }
         } catch (GLib.Error e) {
             critical("Couldn't write to STDIN of SSH command. Error: %s", e.message);
-            Posix.kill(this.pid, Posix.SIGTERM);
+            Posix.kill(this.pid, Posix.Signal.TERM);
             return false;
         }
 


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