Mainly, much of our code was too noisy and guarding for waitpid
error cases which never happen.

Perl `waitpid' will always retry on EINTR (cf. perlipc(1)) and
it never returns `undef' on error, only -1.  I don't understand
why Perl does it this way, all other syscalls return `undef' on
error, but Perl only documents -1 for errors and my
understanding of the Perl sources says it can't return `undef'.

So start working on reducing waitpid call sites...

Eric Wong (6):
  ds: awaitpid: Perl waitpid retries on EINTR automatically
  auto_reap: waitpid never returns undef
  lei_blob: use ProcessPipe to eliminate a waitpid call
  fetch: fix missing chdir arg for error reporting
  spamcheck/spamc: rely on ProcessPipe instead of waitpid
  spawn: add run_wait to simplify spawn+waitpid use

 lib/PublicInbox/AutoReap.pm        |  7 +++----
 lib/PublicInbox/DS.pm              |  9 +++------
 lib/PublicInbox/Fetch.pm           | 10 +++++-----
 lib/PublicInbox/LEI.pm             |  5 ++---
 lib/PublicInbox/LeiBlob.pm         | 19 +++++++------------
 lib/PublicInbox/LeiMailDiff.pm     |  6 ++----
 lib/PublicInbox/LeiMirror.pm       |  8 +++-----
 lib/PublicInbox/LeiRediff.pm       |  7 +++----
 lib/PublicInbox/SearchIdx.pm       |  6 ++----
 lib/PublicInbox/Spamcheck/Spamc.pm | 11 ++++-------
 lib/PublicInbox/Spawn.pm           | 13 +++++++++----
 lib/PublicInbox/TestCommon.pm      |  6 +-----
 12 files changed, 44 insertions(+), 63 deletions(-)

More deletions than insertions is good.

Reply via email to