]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
spawn: add note about dropping SCM_RIGHTS in Inline::C
authorEric Wong <e@80x24.org>
Tue, 19 Aug 2025 00:33:36 +0000 (00:33 +0000)
committerEric Wong <e@80x24.org>
Wed, 20 Aug 2025 19:10:16 +0000 (19:10 +0000)
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

index 9f4752f9cb6219141ef22f579afb6ff8315a8ecb..7bad71193d50cee6c3fd7f959a16dea88ef47c54 100644 (file)
@@ -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;