mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
fix(edencommon)
we hardcoded the source url :(
This commit is contained in:
parent
5cd22964a6
commit
d11f61e163
2 changed files with 12 additions and 23 deletions
|
@ -1,5 +1,5 @@
|
|||
distributable:
|
||||
url: https://github.com/facebookexperimental/edencommon/archive/v2023.06.19.00.tar.gz
|
||||
url: https://github.com/facebookexperimental/edencommon/archive/v{{version.raw}}.tar.gz
|
||||
strip-components: 1
|
||||
|
||||
versions:
|
||||
|
@ -33,8 +33,5 @@ build:
|
|||
- -DBUILD_TESTING=OFF
|
||||
|
||||
test:
|
||||
dependencies:
|
||||
llvm.org: '*'
|
||||
script:
|
||||
- clang++ -std=c++17 test.cc -o test -ledencommon_utils -lfolly -lglog
|
||||
- ./test | grep test
|
||||
- ./test 1
|
||||
|
|
|
@ -1,20 +1,12 @@
|
|||
#include <eden/common/utils/ProcessNameCache.h>
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
#include <eden/common/utils/ProcessInfo.h>
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
|
||||
using namespace facebook::eden;
|
||||
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;
|
||||
int main(int argc, char **argv) {
|
||||
if (argc <= 1) return 1;
|
||||
int pid = std::atoi(argv[1]);
|
||||
std::cout << readProcessName(pid) << std::endl;
|
||||
return 0;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue