Every line of 'restart program python' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
61 def restart(): 62 try: 63 with open(PID_PATH, 'r') as pid_file: 64 pid = pid_file.read() 65 except IOError: 66 pid = None 67 command = 'haproxy -f {config_path} -p {pid_path}'.format(config_path=CONFIG_PATH, pid_path=PID_PATH) 68 if pid: 69 command += ' -sf {pid}'.format(pid=pid) 70 os.system(command)
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code