mirror of
https://github.com/ivabus/pantry
synced 2024-12-01 20:45:10 +03:00
7ae694ad37
* 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>
20 lines
No EOL
512 B
C++
20 lines
No EOL
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;
|
|
} |