diff options
author | Havoc Pennington <hp@pobox.com> | 2003-09-25 01:50:30 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2003-09-25 01:50:30 +0000 |
commit | 28fbdc611e9a81030b5078f403fc4ee467ab6527 (patch) | |
tree | 2f147839a9bb7f92a79714e166953fbb30e2405a | |
parent | 99c7dc8b85e6e74dea4f793d37ffdf6b35afc9e2 (diff) | |
download | metacity-28fbdc611e9a81030b5078f403fc4ee467ab6527.tar.gz |
fix hang when we get EOF, #121376 from Laurent Vivier
2003-09-24 Havoc Pennington <hp@pobox.com>
* src/session.c (io_from_warning_dialog): fix hang when we get
EOF, #121376 from Laurent Vivier
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/session.c | 14 |
2 files changed, 19 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2003-09-24 Havoc Pennington <hp@pobox.com> + + * src/session.c (io_from_warning_dialog): fix hang when we get + EOF, #121376 from Laurent Vivier + 2003-09-22 Taneem Ahmed <taneem@bengalinux.org> * configure.in: Added "bn" to ALL_LINGUAS. diff --git a/src/session.c b/src/session.c index b3053e46..93fffb17 100644 --- a/src/session.c +++ b/src/session.c @@ -1815,6 +1815,20 @@ io_from_warning_dialog (GIOChannel *channel, /* Remove the callback, freeing data */ return FALSE; } + else if (condition & G_IO_IN) + { + /* Check for EOF */ + + char buf[16]; + int ret; + + ret = read (d->child_pipe, buf, sizeof (buf)); + if (ret == 0) + { + finish_interact (d->shutdown); + return FALSE; + } + } /* Keep callback installed */ return TRUE; |