GNOME Bugzilla – Bug 732002
gwakeup: Clarify buffer sizing in g_wakeup_signal()
Last modified: 2014-06-21 16:42:41 UTC
Patch attached. See the commit message for some rationale.
Created attachment 278885 [details] [review] gwakeup: Clarify buffer sizing in g_wakeup_signal() The code in g_wakeup_signal() is currently correct: it writes a 64-bit counter increment value if the FD is an eventfd, and writes an arbitrary 8-bit value if using a normal pipe. However, the reasoning behind these buffer sizes is not clear, and the mismatch between the allocated buffer size and the length passed to write() in the pipe case could be mistaken for a bug. Coverity issue: #1159490
Review of attachment 278885 [details] [review]: Yep, makes sense. Excellent commit message.
Comment on attachment 278885 [details] [review] gwakeup: Clarify buffer sizing in g_wakeup_signal() commit 6b8ae8f21b909102b4279900e90cb294cf542188 Author: Philip Withnall <philip@tecnocode.co.uk> Date: Sat Jun 21 10:48:08 2014 +0100 gwakeup: Clarify buffer sizing in g_wakeup_signal() The code in g_wakeup_signal() is currently correct: it writes a 64-bit counter increment value if the FD is an eventfd, and writes an arbitrary 8-bit value if using a normal pipe. However, the reasoning behind these buffer sizes is not clear, and the mismatch between the allocated buffer size and the length passed to write() in the pipe case could be mistaken for a bug. Coverity issue: #1159490 https://bugzilla.gnome.org/show_bug.cgi?id=732002 glib/gwakeup.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)