about summary refs log tree commit homepage
path: root/lib/PublicInbox/SpawnPP.pm
DateCommit message (Collapse)
2020-02-06treewide: run update-copyrights from gnulib for 2019
I didn't wait until September to do it, this year!
2019-12-30spawn: support chdir via -C option
This simplifies our admin module a bit and allows solver to be used with v1 inboxes using git versions prior to v1.8.5 (but still >= git v1.8.0).
2019-12-30spawn: allow passing GLOB handles for redirects
We can save callers the trouble of {-hold} and {-dev_null} refs as well as the trouble of calling fileno().
2019-09-24spawnpp: use absolute path for exec
We support "-env" to clear the environment with spawn(), which causes test failures but no runtime failures (since "-env" isn't used anywhere in our real code) Reported-and-tested-by: Alyssa Ross <hi@alyssa.is>
2019-09-09run update-copyrights from gnulib for 2019
2019-04-04spawn: support RLIMIT_CPU, RLIMIT_DATA and RLIMIT_CORE
We'll be spawning cgit and git-diff, which can take gigantic amounts of CPU time and/or heap given the right (ermm... wrong) input. Limit the damage that large/expensive diffs can cause.
2019-01-09doc: various overview-level module comments
Hopefully this helps people familiarize themselves with the source code.
2018-02-07update copyrights for 2018
Using update-copyrights from gnulib While we're at it, use the SPDX identifier for AGPL-3.0+ to ease mechanical processing.
2016-06-21spawn: improve error checking for fork failures
fork failures are unfortunately common when Xapian has gigabytes and gigabytes mmapped.
2016-06-18spawn: try to keep signals blocked in spawned child
While we only want to stop our daemons and gracefully destroy subprocesses, it is common for 'Ctrl-C' from a terminal to kill the entire pgroup. Killing an entire pgroup nukes subprocesses like git-upload-pack breaks graceful shutdown on long clones. Make a best effort to ensure git-upload-pack processes are not broken when somebody signals an entire process group. Followup-to: commit 37bf2db81bbbe114d7fc5a00e30d3d5a6fa74de5 ("doc: systemd examples should only kill one process")
2016-05-03spawnpp: use native perl %ENV outside of mod_perl
We only need to use env(1) under mod_perl; since mod_perl is uncommon nowadays, support native %ENV for a teeny speedup for folks uncomfortable with running vfork via Inline::C snippet.
2016-02-29spawnpp: use env(1) for mod_perl compatibility
We cannot modify %ENV directly under mod_perl (even after forking!), so use env(1) instead to pass the environment.
2016-02-28spawnpp: die instead of exit on exec failure
Perl may complain about exit not being executed, but not die.
2016-02-28spawnpp: fix error message for stderr redirect failing
Oops :x
2016-02-27initial spawn implementation using vfork
Under Linux, vfork maintains constant performance as parent process size increases. fork needs to prepare pages for copy-on-write, requiring a linear scan of the address space.