[vte] terminal: Remove extraneous fcntl



commit 5f846118919e6f357b7b151e0e2878dd1e63b06a
Author: Christian Persch <chpe src gnome org>
Date:   Sat Oct 12 20:10:55 2019 +0200

    terminal: Remove extraneous fcntl
    
    The PTY in the Pty object is already in nonblocking mode.

 src/vte.cc | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index 6bd1cadd..e879c94c 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -10174,13 +10174,7 @@ Terminal::set_pty(vte::base::Pty *new_pty,
         if (!new_pty)
                 return true;
 
-        int pty_master = pty()->fd();
-
-        /* Ensure the FD is non-blocking */
-        int flags = fcntl(pty_master, F_GETFL);
-        g_warn_if_fail(flags >= 0 && (flags & O_NONBLOCK) == O_NONBLOCK);
-
-        m_pty_channel = g_io_channel_unix_new(pty_master);
+        m_pty_channel = g_io_channel_unix_new(pty()->fd());
         g_io_channel_set_close_on_unref(m_pty_channel, FALSE);
 
         set_size(m_column_count, m_row_count);


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