#include <dlfcn.h>
#include <cstdio>
#include <cstdlib>

void ls()
{
	printf("ls: %d\n", ::system("ls"));
}

int main()
{
	auto libHandle = dlopen("./libfoo.so", RTLD_NOW | RTLD_LOCAL);
	printf("libhandle: %p\n", libHandle);
	ls();
	dlclose(libHandle);
	ls();
}

