Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 487588 - OpenRC: Only print flock() error message when debug is enabled
Summary: OpenRC: Only print flock() error message when debug is enabled
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 481182
  Show dependency tree
 
Reported: 2013-10-11 02:52 UTC by Patrick Lauer
Modified: 2013-10-12 15:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
0001-convert-flock-messages-to-verbose-warnings.patch (0001-convert-flock-messages-to-verbose-warnings.patch,1.20 KB, patch)
2013-10-11 18:03 UTC, William Hubbs
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Lauer gentoo-dev 2013-10-11 02:52:40 UTC
Don't print flock error message unless debug is set.
It clutters up parallel startup and makes it look like something critical failed when it's just a mostly cosmetic output parallelism issue

diff --git a/src/rc/runscript.c b/src/rc/runscript.c
index 0eea335..51f58e7 100644
--- a/src/rc/runscript.c
+++ b/src/rc/runscript.c
@@ -313,7 +313,9 @@ write_prefix(const char *buffer, size_t bytes, bool *prefixed)
        if (lock_fd != -1) {
                while (flock(lock_fd, LOCK_EX) != 0) {
                        if (errno != EINTR) {
+                               #ifdef RC_DEBUG
                                eerror("flock() failed: %s", strerror(errno));
+                               #endif
                                break;
                        }
                }
Comment 1 William Hubbs gentoo-dev 2013-10-11 18:03:24 UTC
Created attachment 360660 [details, diff]
0001-convert-flock-messages-to-verbose-warnings.patch

What do you think about this alternative -- converting these messages to
warnings which are only displayed if EINFO_VERBOSE is set to yes in the
environment?
Comment 2 William Hubbs gentoo-dev 2013-10-12 15:02:57 UTC
This is applied in commit f751e14 and will be included in OpenRC-0.13.