MCPcopy Create free account
hub / github.com/adobe/Marinus / is_running

Function is_running

python3_cron_scripts/zgrab_http_domain.py:56–66  ·  view source on GitHub ↗

Is the provided process name is currently running?

(process)

Source from the content-addressed store, hash-verified

54
55
56def is_running(process):
57 """
58 Is the provided process name is currently running?
59 """
60 proc_list = subprocess.Popen(["pgrep", "-f", process], stdout=subprocess.PIPE)
61 for proc in proc_list.stdout:
62 if proc.decode("utf-8").rstrip() != str(os.getpid()) and proc.decode(
63 "utf-8"
64 ).rstrip() != str(os.getppid()):
65 return True
66 return False
67
68
69def get_domains(all_dns_collection, ip_manager, zone):

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected