Exemplo n.º 1
0
 public void onSlaveTerminated(Process process) {
   synchronized (mAlarm) {
     mExitStatus = process.getExitStatus();
     if (!process.isRunning()) {
       mProcesses.remove(process);
       mZombies.add(process);
       mAlarm.alarm();
     }
   }
 }
Exemplo n.º 2
0
 private Process findZombie(Pid pid) throws UnixException {
   Process process = mZombies.remove(pid);
   if (process != null) {
     return process;
   }
   if (!mProcesses.contains(pid)) {
     // Another thread got the zombie.
     throw new UnixException(Errno.ECHILD);
   }
   return null;
 }