1. 20 Aug, 2018 5 commits
  2. 17 Aug, 2018 3 commits
  3. 16 Aug, 2018 1 commit
  4. 15 Aug, 2018 1 commit
  5. 12 Aug, 2018 1 commit
  6. 11 Aug, 2018 1 commit
  7. 09 Aug, 2018 7 commits
  8. 30 Jul, 2018 2 commits
  9. 27 Jul, 2018 1 commit
  10. 24 Jul, 2018 7 commits
  11. 11 Jul, 2018 3 commits
  12. 07 Jul, 2018 1 commit
  13. 25 Jun, 2018 1 commit
    • Debarshi Ray's avatar
      widget: Fix race between polling the master & using the PTY in a child · 65d67f6f
      Debarshi Ray authored
      When a very short-lived process, like true(1), is spawned
      asynchronously as a child, there is a race between the child closing
      the pseudo-terminal's slave device on exit and VteTerminal receiving
      it, and the GAsyncReadyCallback passed to vte_pty_spawn_async being
      invoked. If the child closes it and the G_IO_HUP is received before the
      callback is invoked, then it causes VterTerminal to unset its VtePty
      object, which leads to the following CRITICAL when the callback tries
      to set up a watch on the child:
        Vte-CRITICAL **: void vte_terminal_watch_child(VteTerminal*, GPid):
          assertion 'impl->m_pty != NULL' failed
      
      The race can be avoided by setting up the GIOChannel to poll the
      pseudo-terminal master device only after the callback has been
      invoked. If the kernel has already buffered up some activity on the
      slave device, then that will be seen in the next iteration of the main
      loop, and the VtePty won't be unset before setting up the watch.
      
      There is a similar race for downstreams that continue to use
      gnome-pty-helper. In those cases, the helper is in charge of creating
      the pseudo-terminal device pair, and it closes its copies of the file
      descriptors after sending them to VteTerminal. If VteTerminal starts
      polling the master device immediately after receiving it from the
      helper, before the child process has been forked, and the helper loses
      the race to close its copy of the slave device's file descriptor
      before the master is polled, then VteTerminal will receive a G_IO_HUP
      and stop reading further input from the master. The subsequently forked
      child process gets left in a defunct state and the same CRITICAL is
      logged.
      
      This also makes vte_terminal_spawn_async match its synchronous variant,
      which is nice.
      
      Fixes #7:
      #7
      65d67f6f
  14. 23 Jun, 2018 1 commit
  15. 22 Jun, 2018 1 commit
  16. 20 Jun, 2018 4 commits