[network-manager-openswan] service: watch for pty master hangups



commit 984035deb4ce61ce5e65d5b05add1197e7fd5f2b
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Thu Oct 22 12:04:54 2015 +0200

    service: watch for pty master hangups
    
    The callback handles hangups, but they seem to be accidentally masked out.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1271973#c5

 src/nm-openswan-service.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/nm-openswan-service.c b/src/nm-openswan-service.c
index 9b0847b..24b32d4 100644
--- a/src/nm-openswan-service.c
+++ b/src/nm-openswan-service.c
@@ -1116,7 +1116,7 @@ connect_step (NMOpenSwanPlugin *self, GError **error)
                priv->channel = g_io_channel_unix_new (up_pty);
                g_io_channel_set_encoding (priv->channel, NULL, NULL);
                g_io_channel_set_buffered (priv->channel, FALSE);
-               priv->io_id = g_io_add_watch (priv->channel, G_IO_IN | G_IO_ERR, io_cb, self);
+               priv->io_id = g_io_add_watch (priv->channel, G_IO_IN | G_IO_ERR | G_IO_HUP, io_cb, self);
 
                if (debug) {
                        pipe_init (&priv->out, up_stdout, "OUT");


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