Skip to content
Snippets Groups Projects
Verified Commit e90fa3e3 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Do not try to open traceme on special PIDs

parent c51aec1a
No related branches found
No related tags found
No related merge requests found
...@@ -52,6 +52,8 @@ pub fn init_state() -> &'static State { ...@@ -52,6 +52,8 @@ pub fn init_state() -> &'static State {
} }
} }
pub fn is_traceme(pid: pid_t) -> bool { pub fn is_traceme(pid: pid_t) -> bool {
// Skip special PIDs (<=0)
if pid <= 0 { return false; }
File::open( File::open(
&CString::new(format!("chan:ptrace-relibc/{}/traceme", pid)).unwrap(), &CString::new(format!("chan:ptrace-relibc/{}/traceme", pid)).unwrap(),
fcntl::O_PATH, fcntl::O_PATH,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment