The keymgr is responsible for generating private keys for the
account and domains which can take a while. However the
worker supervisor still only gave keymgr 5 seconds to
start which usually leads to strange errors when
trying to start keymgr with ACME=1 if no
account-key was present.
The tasks example stopped working on Linux (Ubuntu 22.04) due to the use of missing syscalls, which have been added in this fix. In addition, the definition files have been updated to include the newer clone3 system call (in the Linux kernel since 5.6) for new process and thread creation.
* generated sources for assets are skipped through filepath check
it's fine for now, but probably should be redone
* despite Kore supports JSON manipulation, kodev doesn't share this code
so for now JSON file is being regenerated each build
* tested in Qt Creator, works OK
Takes a new parameter now `qs`, if set to 1 it'll urldecode
according to how its always done it before.
If not set to 0 (for posts for example), the decoder will allow
\n and \r in addition to the other ones.
Its better to place this inside of kore_worker_privsep(), this
way it'll be called for each process still and we can do it
before we sandbox the processes completely.
When trying to pin a worker to a certain CPU, Kore will log
if it fails but still continue.
The problem is that it tried to do it a bit early and the logging
facilities were not yet setup, causing it to be unable to continue
if kore_log() was called too early.
By moving it to kore_worker_started() we are certain all facilities
are up and running correctly.
Add redirect() method to add a redirect on a domain much like
in the Kore configuration file.
eg:
domain.redirect("^/account/(.*)$", 301, "https://site/account/$1")
If kore_realloc() decides that a new block must be allocated it will
explicitly call the new kore_free_zero() function to erase the
contents of the old block once the move is done.
In practice this rarely works anyway as other libs can end up
allocating things before we even reach main() as demonstrated
on the discord channel earlier.
It was hardcoded that if KORE_USE_PYTHON was defined we would
look at the passed argument on the command-line as the python
script or module to be run.
This won't work when adding more runtimes.
So instead call a kore_runtime_resolve() function that in
turn calls each available runtime its resolve function.
That resolve function will check if its a script / module
that it can load, and if so will load it.
This way we can remove all those KORE_USE_PYTHON blocks in the
Kore startup path and we pave the way for lua.