Skip to content

Commit a1ef3b2

Browse files
committed
Add waitForExit
1 parent ecd1bca commit a1ef3b2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CodeEdit/Features/Tasks/Models/CEActiveTask.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,12 @@ class CEActiveTask: ObservableObject, Identifiable, Hashable {
125125
}
126126
}
127127

128+
func waitForExit() {
129+
for pid in output?.getChildProcesses() ?? [] {
130+
waitpid(pid, nil, 0)
131+
}
132+
}
133+
128134
func clearOutput() {
129135
output?.terminal.resetToInitialState()
130136
output?.feed(text: "")

0 commit comments

Comments
 (0)