WIP/cpp -> next #31

Fechado
crtxcr quer aplicar o merge de 16 commits de WIP/cpp em next

16 Commits

Autor SHA1 Mensagem Data
73dae3a102 append_syscall_to_bpf(): Check for unlikely case of too many sock_filters 2022-03-17 15:17:28 +01:00
f2ca26010a exile.hpp: Mark do_clone inline, not static 2022-03-15 08:48:04 +01:00
0f39ee7061 Makefile: Build exile.o separately, link it in all tests 2022-03-15 08:48:04 +01:00
41bd6e8f10 exile.h: Retire static child_read/write_pipe vars 2022-03-15 08:48:04 +01:00
7f083909e6 exile.h: Move definitions to new file exile.c
Especially with exile_launch(), we will be included
from more than one translation unit. Thus, ODR becomes
a headache now.

So move definitions to exile.c.
2022-03-15 08:48:04 +01:00
732623fc6f exile.h: Add extern "C" guards 2022-03-15 08:48:04 +01:00
dcfbe641f9 c++: Add explicit exile_launch() std::basic_string variant 2022-03-15 08:48:04 +01:00
72a3b041d9 c++: Retire exile_launch_trivial(), use std::enable_if 2022-03-15 08:48:04 +01:00
c57ba807d7 Makefile: Add 'tests' target, depend on headers too to rebuild on changes of those 2022-03-15 08:48:04 +01:00
6f19c53acf test.sh: Also run C++ tests 2022-03-15 08:48:04 +01:00
99d26480d7 Add test.cpp to test C++ API 2022-03-15 08:48:04 +01:00
f13cff754c Begin C++ API: Add exile.hpp with exile_launch() wrappers 2022-03-15 08:48:04 +01:00
278ae31e2e fixup! Introduce exile_vows_from_str() 2022-01-30 10:45:05 +01:00
5ef54a08b4 struct syscall_vow_map: change 'str' to const char* 2022-01-30 10:42:46 +01:00
29b5864dd3 test: Introduce LOG(), avoid inconsistent printf/fprintf 2022-01-17 22:48:29 +01:00
0a4e4850f9 Introduce exile_vows_from_str() 2022-01-17 22:42:26 +01:00