Sorry for the huge commit, I forgot to do it while adding the changes.
Some minor changes too: * doas is called with flag "-n", this avoid blocking iblock if doas ismisconfigured. * pfctl calls are run in separate fork process * iblock listening port is now the better 2507 instead of already used by other softwares 666. * Added a rc script to start iblock as daemon.
I'd like a review about zombie process if someone know how to check for such things, please.
I added a signal handler to catch child process.
It seems to be called.
However, "pgrep iblock" still find new process at each loop.
Need someone better than me here to explain this behaviour.
My bad, that weren't zombies. Just duplicated listening sockets remaining. My bad.
This should be ok now.
Currently, only ipv4 or ipv6 is supported, but not both at the same time.
That's it, I think I have finished to turn iblock to a server.
I'm curious how it handle stress of many attempts.
Please test :)
I'd like to have a flag to choose the port on which iblock is listening.
main() is very long, isn't it possible to split it into smaller functions?
Voilà, j'ai fini ce que suis en mesure de faire je crois.
Ça tourne sur mon serveur sans soucis remarquables.
Dis moi s'il manque quelque chose ;)
Step 1:From your project repository, check out a new branch and test the changes.
Step 2:Merge the changes and update on Gitea.
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?