File tree Expand file tree Collapse file tree 1 file changed +1
-44
lines changed Expand file tree Collapse file tree 1 file changed +1
-44
lines changed Original file line number Diff line number Diff line change @@ -50,50 +50,7 @@ static bool GetProcessAndStatInfo(::pid_t pid,
5050
5151uint32_t Host::FindProcessesImpl (const ProcessInstanceInfoMatch &match_info,
5252 ProcessInstanceInfoList &process_infos) {
53- static const char procdir[] = " /proc/" ;
54-
55- DIR *dirproc = opendir (procdir);
56- if (dirproc) {
57- struct dirent *direntry = nullptr ;
58- const uid_t our_uid = getuid ();
59- const lldb::pid_t our_pid = getpid ();
60- bool all_users = match_info.GetMatchAllUsers ();
61-
62- while ((direntry = readdir (dirproc)) != nullptr ) {
63-
64- lldb::pid_t pid = atoi (direntry->d_name );
65-
66- // Skip this process.
67- if (pid == our_pid)
68- continue ;
69-
70- ::pid_t tracerpid;
71- ProcessState State;
72- ProcessInstanceInfo process_info;
73-
74- if (!GetProcessAndStatInfo (pid, process_info, State, tracerpid))
75- continue ;
76-
77- // Skip if process is being debugged.
78- if (tracerpid != 0 )
79- continue ;
80-
81- if (State == ProcessState::Zombie)
82- continue ;
83-
84- // Check for user match if we're not matching all users and not running
85- // as root.
86- if (!all_users && (our_uid != 0 ) && (process_info.GetUserID () != our_uid))
87- continue ;
88-
89- if (match_info.Matches (process_info))
90- process_infos.push_back (process_info);
91- }
92-
93- closedir (dirproc);
94- }
95-
96- return process_infos.size ();
53+ return 0 ;
9754}
9855
9956bool Host::GetProcessInfo (lldb::pid_t pid, ProcessInstanceInfo &process_info) {
You can’t perform that action at this time.
0 commit comments