about summary refs log tree commit homepage
path: root/lib/PublicInbox/Spawn.pm
DateCommit message (Collapse)
2016-02-29favor procedural calls for most private functions
This makes for better compile-time checking and also helps document which calls are private for HTTP and NNTP. While we're at it, use IO::Handle::* functions procedurally, too, since we know we're working with native glob handles.
2016-02-28reduce calls to close unless error checks are needed
We can rely on timely auto-destruction based on reference counting; reducing the chance of redundant close(2) calls which may hit the wront FD. We do care about certain close calls (e.g. writing to a buffered IO handle) if we require error-checking for write-integrity. In other cases, let things go out-of-scope so it can be freed automatically after use.
2016-02-28spawn: disable popen optimization for non-vfork
This is necessary since we want to be able to do arbitrary redirects via the popen interface. Oh well, we'll be a little slower for now for users without vfork. vfork users will get all the performance benefits.
2016-02-27spawn: fail properly if Inline fails
We must stash the error correctly when nesting evals, oops :x
2016-02-27git: use built-in spawn implementation for vfork
This should reduce overhead of spawning git processes from our long-running httpd and nntpd servers.
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.