[Patch] Fix for the eof detection in the mail check program pipe
| Newsgroups | gmane.comp.gnome.apps.gkrellm |
|---|---|
| Message-ID | <20090427155749.GA30330@dt> |
Hi,
When using external mail check program, gkrellm doesn't properly check
eof of the open pipe, and therefore only runs the program once at
startup. To reproduce the bug, just set the program to some popup (e.g.,
kdialog) and click on the envelope (forced check). Nothing will happen.
The fix is trivial and attached below. Tested with 2.3.2 on debian.
Regards.
-------------------------------------------
--- gkrellm-2.3.2-orig/src/mail.c 2008-10-03 20:33:37.000000000 -0400
+++ gkrellm-2.3.2/src/mail.c 2009-04-27 10:55:16.000000000 -0400
@@ -1893,7 +1893,7 @@
#endif
if (n <= 0)
{
- if (errno != EINTR && errno != EAGAIN)
+ if ((n == 0) || (errno != EINTR && errno != EAGAIN))
{
if (close(mp->pipe) < 0 && errno == EINTR)
close(mp->pipe);
______________________________________________
Gkrellm mailing list
[email protected]
Read archives-join-leave-set RSS feed:
http://archive.lists.netservicesgroup.com
This service is provided by The Network Services Group:
http://www.netservicesgroup.com