Summary | Avoid infinite loop if popen fails |
Queue | Horde Base |
Queue Version | HEAD |
Type | Enhancement |
State | Resolved |
Priority | 1. Low |
Owners | |
Requester | horde (at) immerda (dot) ch |
Created | 03/01/2009 (5947 days ago) |
Due | |
Updated | 03/02/2009 (5946 days ago) |
Assigned | |
Resolved | 03/02/2009 (5946 days ago) |
Milestone | |
Patch | No |
Type ⇒ Enhancement
State ⇒ Resolved
Priority ⇒ 1. Low
Version ⇒ HEAD
no error thrown previously, this won't be backported to Horde 3.
Priority ⇒ 1. Low
New Attachment: pgp_avoid_infinite_loop.diff
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Horde Base
Summary ⇒ Avoid infinite loop if popen fails
Type ⇒ Bug
State ⇒ Unconfirmed
process exceeded while talking to gpg and hence the popen termintated
abnormally. This abnormal termination isn't caught by horde and hence
the following loop will lead to an infinite loop and fill the php logs.
http://ch.php.net/manual/en/function.feof.php warns about the problem
of an infinite loop and comments propose various ways to avoid that.
The attached patch will introduce one of the discussed ways to deal
with this problem.
We are operating now with this patch for some time and didn't
encounter anymore the problem of an infinite loop.
As far as we could see this problem exists in other popen calls as
well and hence it might be worth to review all the popen calls of
horde apps, to avoid this problem.