File tree 1 file changed +12
-6
lines changed
1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -80,16 +80,22 @@ def process_is_killed() -> bool:
80
80
# Verify the process has stopped
81
81
ps_output = pane .capture_pane ()
82
82
83
- # Check if there's an actual running sleep process
84
- # We need to filter out:
85
- # 1. The command line (pkill -f 'sleep 10')
86
- # 2. The grep command itself (grep sleep)
87
- # 3. The termination notice ([1] + terminated sleep 10)
83
+ # The output might contain a message like '[1] + terminated sleep 10'
84
+ # but this indicates the process has been terminated, not that it's running
88
85
is_running = False
89
86
for line in ps_output :
90
87
# Look for a line with PID and 'sleep 10' without being a command or
91
88
# termination message
92
- is_command_line = line .startswith ("d%" ) or "grep sleep" in line
89
+ # Check for command prompts in different environments (local and CI)
90
+ is_command_line = (
91
+ line .startswith ("d%" )
92
+ or "grep sleep" in line
93
+ or
94
+ # CI environment command line detection
95
+ "$" in line
96
+ or line .startswith ("runner@" )
97
+ or "pkill" in line
98
+ )
93
99
is_termination = "terminated" in line
94
100
95
101
if (
You can’t perform that action at this time.
0 commit comments