mirror of
https://github.com/openstf/stf
synced 2025-10-04 02:09:32 +02:00
devutil.killProcsByComm() was not falling back to SIGKILL like it should have been. Fixed. Also added a small delay between kill checks.
This commit is contained in:
parent
6893abdb75
commit
0a28757f62
1 changed files with 6 additions and 3 deletions
|
@ -120,7 +120,10 @@ devutil.waitForProcsToDie = function(adb, serial, comm, bin) {
|
|||
return devutil.listPidsByComm(adb, serial, comm, bin)
|
||||
.then(function(pids) {
|
||||
if (pids.length) {
|
||||
return devutil.waitForProcsToDie(adb, serial, comm, bin)
|
||||
return Promise.delay(100)
|
||||
.then(function() {
|
||||
return devutil.waitForProcsToDie(adb, serial, comm, bin)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -140,8 +143,8 @@ devutil.killProcsByComm = function(adb, serial, comm, bin, mode) {
|
|||
.then(function() {
|
||||
return devutil.waitForProcsToDie(adb, serial, comm, bin)
|
||||
})
|
||||
.timeout(1000)
|
||||
.then(function() {
|
||||
.timeout(2000)
|
||||
.catch(function() {
|
||||
return devutil.killProcsByComm(adb, serial, comm, bin, -9)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue