diff --git a/src/shared/proc.cpy b/src/shared/proc.cpy index 807e7a73..a54e103f 100644 --- a/src/shared/proc.cpy +++ b/src/shared/proc.cpy @@ -11,6 +11,7 @@ #include #include #include +#include #define PID 1 #define PGROUP 4 @@ -54,6 +55,8 @@ namespace proc: int used = 0 ; + std::set known_interpreters {"python", "python3", "bash", "sh"} + string join_path(vector v): ostringstream s; for const auto& i : v: @@ -110,13 +113,16 @@ namespace proc: base = basename((char *) base) base_str := string(base) + auto search_interpreter = known_interpreters.find(base_str) + if search_interpreter != known_interpreters.end(): + continue + for auto needle : args: if base_str == needle || full_str == needle: found = true break - if found: - break + break return found