Re: [Patch] Fix for the eof detection in the mail check program pipe
Sandro Tosi <[email protected]>
| Newsgroups | gmane.comp.gnome.apps.gkrellm |
|---|---|
| Message-ID | <[email protected]> |
Hi xeyrion, On Mon, Apr 27, 2009 at 17:57, <[email protected]> wrote: > 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. I'm the Debian gkrellm package maintainer. May you please tell why you didn't get also in touch with me in order to fix the same bug in Debian? There are 2 reports about it: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487275 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=499831 > --- 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); In any case, thanks for the patch :) I'll merge into the debian package soon. Cheers, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi ______________________________________________ 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