diff options
author | Colin Watson <cjwatson@debian.org> | 2013-07-08 03:01:42 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2013-07-08 03:01:42 +0100 |
commit | 22840e4bc260a597f6f88179a8f74bc0a5b2cbf5 (patch) | |
tree | 5db13b427b356bd0a4e7eaf5fd2e018a8acd31c5 | |
parent | f4691bad8ae0c3b9d2e1366c94a2bc612587396b (diff) |
* src/check_mandirs.c (gripe_rwopen_failed, update_db_time):
Downgrade EAGAIN/EWOULDBLOCK errors from attempts to open a
database read-write to debug messages (Debian bug #684235).
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/check_mandirs.c | 17 |
2 files changed, 20 insertions, 3 deletions
@@ -1,3 +1,9 @@ +Mon Jul 8 03:00:20 BST 2013 Colin Watson <cjwatson@debian.org> + + * src/check_mandirs.c (gripe_rwopen_failed, update_db_time): + Downgrade EAGAIN/EWOULDBLOCK errors from attempts to open a + database read-write to debug messages (Debian bug #684235). + Mon Jul 8 02:26:07 BST 2013 Colin Watson <cjwatson@debian.org> * man/man1/whatis.man1 (NAME): Clarify that whatis displays one-line diff --git a/src/check_mandirs.c b/src/check_mandirs.c index f954dbf7..64108577 100644 --- a/src/check_mandirs.c +++ b/src/check_mandirs.c @@ -112,6 +112,8 @@ static void gripe_rwopen_failed (void) { if (errno == EACCES || errno == EROFS) debug ("database %s is read-only\n", database); + else if (errno == EAGAIN || errno == EWOULDBLOCK) + debug ("database %s is locked by another process\n", database); else { #ifdef MAN_DB_UPDATES if (!quiet) @@ -546,11 +548,20 @@ void update_db_time (void) /* we know that this should succeed because we just updated the db! */ dbf = MYDBM_RWOPEN (database); if (dbf == NULL) { + if (errno == EAGAIN || errno == EWOULDBLOCK) + /* Another mandb process is probably running. With + * any luck it will update the mtime ... + */ + debug ("database %s is locked by another process\n", + database); + else { #ifdef MAN_DB_UPDATES - if (!quiet) + if (!quiet) #endif /* MAN_DB_UPDATES */ - error (0, errno, _("can't update index cache %s"), - database); + error (0, errno, + _("can't update index cache %s"), + database); + } free (MYDBM_DPTR (content)); return; } |