From d19a792e58eba8f13d9c7a0160cc5f1402e7f117 Mon Sep 17 00:00:00 2001 From: David Timber Date: Sat, 6 Nov 2021 19:07:41 +0800 Subject: Add more callbacks for fork() event, doc progress * Add fork.prepare(), fork.parent() and fork.child() to match with pthread_atfork(), which makes more sense * Code documentation progress --- src/proone-htbthost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/proone-htbthost.c') diff --git a/src/proone-htbthost.c b/src/proone-htbthost.c index d0aa865..9ab8fae 100644 --- a/src/proone-htbthost.c +++ b/src/proone-htbthost.c @@ -165,7 +165,7 @@ static bool cb_upbin ( return pth_raise(main_pth, SIGTERM) != 0; } -static bool cb_fork (void *ctx) { +static bool cb_fork_child (void *ctx) { sigset_t ss; sigfillset(&ss); @@ -551,7 +551,7 @@ int main (const int argc, const char **args) { param.cb_f.hostinfo = cb_hostinfo; param.cb_f.tmpfile = mktmpfile; param.cb_f.upbin = cb_upbin; - param.cb_f.fork = cb_fork; + param.cb_f.fork.child = cb_fork_child; param.blackhole = open("/dev/null", O_WRONLY); w = wkr_arr + 1; -- cgit