From: Eric Wong Date: Wed, 22 Feb 2023 17:25:52 +0000 (+0000) Subject: sendmsg: prefix sleep message with `#' X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd73e06277ae9286e9a823b591ca5187ce35cdca;p=thirdparty%2Fpublic-inbox.git sendmsg: prefix sleep message with `#' It's an informative message that's harmless, so hopefully the `#' prefix puts the users mind at ease. (I saw it on an `lei import' against an IMAP source) --- diff --git a/lib/PublicInbox/CmdIPC4.pm b/lib/PublicInbox/CmdIPC4.pm index e368d0324..998902444 100644 --- a/lib/PublicInbox/CmdIPC4.pm +++ b/lib/PublicInbox/CmdIPC4.pm @@ -23,7 +23,7 @@ no warnings 'once'; } while (!defined($s) && ($!{ENOBUFS} || $!{ENOMEM} || $!{ETOOMANYREFS}) && (++$try < 50) && - warn "sleeping on sendmsg: $! (#$try)\n" && + warn "# sleeping on sendmsg: $! (#$try)\n" && select(undef, undef, undef, 0.1) == 0); $s; }; diff --git a/lib/PublicInbox/Spawn.pm b/lib/PublicInbox/Spawn.pm index 826ee5088..dc11543a9 100644 --- a/lib/PublicInbox/Spawn.pm +++ b/lib/PublicInbox/Spawn.pm @@ -171,7 +171,7 @@ static int sleep_wait(unsigned *tries, int err) switch (err) { case ENOBUFS: case ENOMEM: case ETOOMANYREFS: if (++*tries < 50) { - fprintf(stderr, "sleeping on sendmsg: %s (#%u)\n", + fprintf(stderr, "# sleeping on sendmsg: %s (#%u)\n", strerror(err), *tries); nanosleep(&req, NULL); return 1; diff --git a/lib/PublicInbox/Syscall.pm b/lib/PublicInbox/Syscall.pm index 530ee93bb..841a2106d 100644 --- a/lib/PublicInbox/Syscall.pm +++ b/lib/PublicInbox/Syscall.pm @@ -427,7 +427,7 @@ no warnings 'once'; } while ($sent < 0 && ($!{ENOBUFS} || $!{ENOMEM} || $!{ETOOMANYREFS}) && (++$try < 50) && - warn "sleeping on sendmsg: $! (#$try)\n" && + warn "# sleeping on sendmsg: $! (#$try)\n" && select(undef, undef, undef, 0.1) == 0); $sent >= 0 ? $sent : undef; };