cups/cups-polld_avoid_busy_loop.patch

19 lines
583 B
Diff

--- scheduler/cups-polld.c.orig 2012-03-02 19:26:30.000000000 +0100
+++ scheduler/cups-polld.c 2013-07-05 14:33:08.000000000 +0200
@@ -169,10 +169,15 @@ main(int argc, /* I - Number of comm
/*
* Sleep for any remaining time...
+ * but in case of unusual issues (if remain <= 0 or if restart_polling)
+ * sleep interval seconds to avoid any possible busy-loop
+ * see for example https://bugzilla.novell.com/show_bug.cgi?id=828228
*/
if (remain > 0 && !restart_polling)
sleep(remain);
+ else
+ sleep(interval);
}
return (1);