terryyz commited on
Commit
45c8709
·
verified ·
1 Parent(s): 982569e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -96,7 +96,7 @@ def run_bigcodebench(command):
96
  if process.returncode != 0:
97
  yield f"Error: Command exited with status {process.returncode}\n"
98
 
99
- cleanup_command = "pids=$(ps -u $(id -u) -o pid,comm | grep 'bigcodebench' | awk '{print $1}'); if [ -n \"$pids\" ]; then echo $pids | xargs -r kill; fi; rm -rf /tmp/*"
100
  subprocess.run(cleanup_command, shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
101
 
102
  is_running = False
 
96
  if process.returncode != 0:
97
  yield f"Error: Command exited with status {process.returncode}\n"
98
 
99
+ cleanup_command = "pids=$(ps -u $(id -u) -o pid,comm | grep 'bigcodebench' | awk '{print $1}'); if [ -n \"$pids\" ]; then echo $pids | xargs -r kill; fi; rm -rf /tmp/*; kill $(ps -A -ostat,ppid | awk '/[zZ]/ && !a[$2]++ {print $2}')"
100
  subprocess.run(cleanup_command, shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
101
 
102
  is_running = False