Lines Matching defs:proc
268 if (!(d = opendir("/proc"))) {
269 printf("Failed to open /proc (%s)\n", strerror(errno));
286 snprintf(cmdpath, sizeof(cmdpath), "/proc/%d/cmdline", pid);
297 snprintf(cmdpath, sizeof(cmdpath), "/proc/%d/comm", pid);
337 snprintf(taskpath, sizeof(taskpath), "/proc/%d/task", pid);
359 snprintf(commpath, sizeof(commpath), "/proc/%d/comm", tid);
399 snprintf(path, sizeof(path), "/proc/%d/wchan", tid);
465 snprintf(path, sizeof(path), "/proc/%d/stat", pid);
830 std::unique_ptr<DIR, decltype(&closedir)> proc(opendir("/proc"), closedir);
831 if (proc.get() == nullptr) {
832 MYLOGE("opendir /proc failed: %s\n", strerror(errno));
844 while ((d = readdir(proc.get()))) {
850 const std::string link_name = android::base::StringPrintf("/proc/%d/exe", pid);
934 /* walk /proc and kill -QUIT all Dalvik processes */
935 DIR *proc = opendir("/proc");
936 if (proc == NULL) {
937 MYLOGE("/proc: %s\n", strerror(errno));
955 while ((d = readdir(proc))) {
961 snprintf(path, sizeof(path), "/proc/%d/exe", pid);
970 snprintf(path, sizeof(path), "/proc/%d/cmdline", pid);