diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2007-02-23 16:10:30 +0000 |
---|---|---|
committer | Chris Wilson <cpwilson@src.gnome.org> | 2007-02-23 16:10:30 +0000 |
commit | 728c62c88fd6475ba02f07a36672a26431d1eda0 (patch) | |
tree | 26582ab06bf24fae0a3965903074448aa12901df | |
parent | 0e510fe7354ac3987f0c0b10521768063eb40560 (diff) | |
download | vte-728c62c88fd6475ba02f07a36672a26431d1eda0.tar.gz |
Prevent a deadlock on recursively grabbing the gdk_mutex.
2007-02-23 Chris Wilson <chris@chris-wilson.co.uk>
* src/vte.c: (vte_terminal_io_read):
Prevent a deadlock on recursively grabbing the gdk_mutex.
svn path=/trunk/; revision=1733
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/vte.c | 11 |
2 files changed, 13 insertions, 3 deletions
@@ -1,5 +1,10 @@ 2007-02-23 Chris Wilson <chris@chris-wilson.co.uk> + * src/vte.c: (vte_terminal_io_read): + Prevent a deadlock on recursively grabbing the gdk_mutex. + +2007-02-23 Chris Wilson <chris@chris-wilson.co.uk> + Heuristic to avoid a read when it's likely to just return EAGAIN. * src/vte-private.h: @@ -3519,9 +3519,14 @@ out: /* If we detected an eof condition, signal one. */ if (eof) { - GDK_THREADS_ENTER (); - vte_terminal_eof (channel, terminal); - GDK_THREADS_LEAVE (); + /* potential deadlock ... */ + if (!vte_terminal_is_processing (terminal)) { + GDK_THREADS_ENTER (); + vte_terminal_eof (channel, terminal); + GDK_THREADS_LEAVE (); + } else { + vte_terminal_eof (channel, terminal); + } } return !eof && (!active_terminals || !active_terminals->next); |