mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-10 04:08:31 +00:00
updated exec to initialize process
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
parent
51746acd8e
commit
57fbde97b4
1 changed files with 2 additions and 1 deletions
|
@ -34,6 +34,7 @@ def _run_with_pty_unix(command):
|
|||
original_sigint = signal.getsignal(signal.SIGINT)
|
||||
|
||||
ctrl_c_pressed = False
|
||||
process = None
|
||||
|
||||
def sigint_handler(signum, frame):
|
||||
nonlocal ctrl_c_pressed
|
||||
|
@ -98,7 +99,7 @@ def _run_with_pty_unix(command):
|
|||
signal.signal(signal.SIGINT, original_sigint)
|
||||
|
||||
os.close(master)
|
||||
if process.poll() is None:
|
||||
if process and process.poll() is None:
|
||||
process.terminate()
|
||||
process.wait()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue