blob: 0f043caedf3edfb1983d0ac52754593ce3f83a1a [file] [log] [blame]
#include <sys/types.h>
#include <thread>
#include <unistd.h>
template <typename T>
void launcher(T func) {
auto t1 = std::thread(func);
auto t2 = std::thread(func);
t1.join();
t2.join();
}
void g() {}
void f() {
fork();
launcher<>(g);
}
int main() {
launcher<>(f);
return 0;
}