Kill orphaned instruments processes (#819)
Summary: Fix https://github.com/facebook/flipper/issues/808 Kills any orphaned Instruments processes belonging to the user. In some cases, we've seen interactions between Instruments and the iOS simulator that cause hung instruments and DTServiceHub processes. If enough instances pile up, the host machine eventually becomes unresponsive. Until the underlying issue is resolved, manually kill any orphaned instances (where the parent process has died and PPID is 1) before launching another instruments run. Taking the same approach as done by flutter here. Reviewed By: passy Differential Revision: D20030005 Pulled By: jknoxville fbshipit-source-id: aa80be78c80f7797e88bf29b15f90d4aad0c66e4
This commit is contained in:
committed by
Facebook Github Bot
parent
4aec81b059
commit
c2dfa6ca6b
@@ -10,6 +10,7 @@
|
||||
import {DeviceType} from '../devices/BaseDevice';
|
||||
import {exec} from 'promisify-child-process';
|
||||
import {notNull} from '../utils/typeUtils';
|
||||
import {killOrphanedInstrumentsProcesses} from '../utils/processCleanup';
|
||||
|
||||
const errorMessage = 'Physical iOS devices not yet supported';
|
||||
|
||||
@@ -24,6 +25,7 @@ function isAvailable(): boolean {
|
||||
}
|
||||
|
||||
async function targets(): Promise<Array<DeviceTarget>> {
|
||||
await killOrphanedInstrumentsProcesses();
|
||||
const {stdout} = await exec('instruments -s devices');
|
||||
if (!stdout) {
|
||||
return [];
|
||||
|
||||
Reference in New Issue
Block a user