]> Sergey Matveev's repositories - public-inbox.git/commit
spawn_pp: cleanup, error checks and descriptive errors
authorEric Wong <e@80x24.org>
Sat, 24 Dec 2022 07:17:07 +0000 (07:17 +0000)
committerEric Wong <e@80x24.org>
Sun, 25 Dec 2022 08:48:23 +0000 (08:48 +0000)
commitf089fec3d66d18dde6aebb0740a7232b0cd571bf
tree4ede6c1d916c067a721d9fd9c6225db03854458e
parent2be1aeb461f905aaf66f5b2599a0dcb22554ad40
spawn_pp: cleanup, error checks and descriptive errors

The pipe(2) call needs to be checked for failure.  While we're
at it, none of this is affected by unicode_strings, so Perl v5.12
is safe to use and gets rid of the strict.pm overhead.

We can also `die' directly since it's pure Perl and not contort
our Perl code to the assumptions of the Inline::C version.

`die' already implies a failure, so follow existing conventions
of just having the failing function or op name.

We can also rely on the grep op for filtering out non-system
signals to avoid writing a loop ourselves.

Finally, drop a needless `undef' on the read side of the pipe
since it's already closed immediately in the child.
lib/PublicInbox/SpawnPP.pm