From: Jason A. Donenfeld Date: Sun, 12 Jan 2014 19:58:21 +0000 (+0100) Subject: filter: allow for cleanup hook for filter types X-Git-Url: https://gitweb.ps.run/ps-cgit/commitdiff_plain/d750c7a2c9bb83cfc47c0d74fcee61f0a5042aa9?hp=d750c7a2c9bb83cfc47c0d74fcee61f0a5042aa9 filter: allow for cleanup hook for filter types At some point, we're going to want to do lazy deallocation of filters. For example, if we implement lua, we'll want to load the lua runtime once for each filter, even if that filter is called many times. Similarly, for persistent exec filters, we'll want to load it once, despite many open_filter and close_filter calls, and only reap the child process at the end of the cgit process. For this reason, we add here a cleanup function that is called at the end of cgit's main(). Signed-off-by: Jason A. Donenfeld ---