pantry/projects/facebook.com/edencommon/test.cc
Andrew 7ae694ad37
facebook.com/edencommon (#2257)
* package & test

* modified:   projects/github.com/facebookexperimental/edencommon/package.yml

* boost for darwin

* build deps

* renamed:    projects/github.com/facebookexperimental/edencommon/package.yml -> projects/facebook.com/edencommon/package.yml
	renamed:    projects/github.com/facebookexperimental/edencommon/test.cc -> projects/facebook.com/edencommon/test.cc

* modified:   projects/facebook.com/edencommon/package.yml

* modified:   projects/facebook.com/edencommon/package.yml

* -DBUILD_SHARED_LIBS=OFF

* +openssl.org: ^1.1

* bump

* bzip2

---------

Co-authored-by: Jacob Heider <jacob@tea.xyz>
2023-08-20 20:17:50 -04:00

20 lines
512 B
C++

#include <eden/common/utils/ProcessNameCache.h>
#include <cstdlib>
#include <iostream>
using namespace facebook::eden;
ProcessNameCache& getProcessNameCache() {
static auto* pnc = new ProcessNameCache;
return *pnc;
}
ProcessNameHandle lookupProcessName(pid_t pid) {
return getProcessNameCache().lookup(pid);
}
int main() {
int pid = getpid();
std::cout << lookupProcessName(pid).get() << std::endl;
return 0;
}