diff options
author | David Timber <mieabby@gmail.com> | 2021-11-06 19:07:41 +0800 |
---|---|---|
committer | David Timber <mieabby@gmail.com> | 2021-11-06 19:07:41 +0800 |
commit | d19a792e58eba8f13d9c7a0160cc5f1402e7f117 (patch) | |
tree | 20a6fab9a3600e15220b4211f6567141326ad590 /src/proone-htbthost.c | |
parent | 7829a29ee65e21b8a234670f9edba31a9a432853 (diff) |
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
Diffstat (limited to 'src/proone-htbthost.c')
-rw-r--r-- | src/proone-htbthost.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |