From e1fbabbd61aa8dfa438b2f04fb93b6ddfff1cf10 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 19 Aug 2025 00:33:36 +0000 Subject: [PATCH] spawn: add note about dropping SCM_RIGHTS in Inline::C Inline::C seems more difficult to support in a hypothetical alternative implementation of Perl which maintains and distributes implementation-specific ports of XS modules. --- lib/PublicInbox/Spawn.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/Spawn.pm b/lib/PublicInbox/Spawn.pm index 9f4752f9c..7bad71193 100644 --- a/lib/PublicInbox/Spawn.pm +++ b/lib/PublicInbox/Spawn.pm @@ -9,8 +9,16 @@ # None of this is intended to be thread-safe since Perl5 maintainers # officially discourage the use of threads. # -# There'll probably be more OS-level C stuff here, down the line. +# n.b. consider dropping Inline::C for SCM_RIGHTS in favor of `syscall' +# and use pack templates (with help from devel/sysdefs-list). +# +# We only need (Inline::C || XS) to support vfork(2) since Perl can't +# guarantee a child won't modify global state. `syscall' and pack/unpack +# ought to handle everything else. +# # We don't want too many DSOs: https://udrepper.livejournal.com/8790.html +# and can rely on devel/sysdefs-list to write (or even generate) `pack' +# perlop templates. package PublicInbox::Spawn; use v5.12; -- 2.47.3