Ramesh-vani commited on
Commit
6042cf9
·
verified ·
1 Parent(s): 8e5a965

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -693,7 +693,7 @@ async def process_input(user_input, process):
693
  print('Stopping process')
694
  # Send Ctrl+C signal to the subprocess
695
  process.send_signal(signal.SIGINT)
696
- process.kill()
697
  # Read output and error asynchronously
698
  # os.kill(int(process.pid), signal.CTRL_C_EVENT)
699
  print('stoping signal sent')
 
693
  print('Stopping process')
694
  # Send Ctrl+C signal to the subprocess
695
  process.send_signal(signal.SIGINT)
696
+ os.killpg(os.getpgid(p.pid), signal.SIGTERM)
697
  # Read output and error asynchronously
698
  # os.kill(int(process.pid), signal.CTRL_C_EVENT)
699
  print('stoping signal sent')