/**
  * Creates a new app handle. The handle will wait for an incoming connection for a configurable
  * amount of time, and if one doesn't arrive, it will transition to an error state.
  */
 ChildProcAppHandle newAppHandle(String secret) {
   ChildProcAppHandle handle = new ChildProcAppHandle(secret, this);
   ChildProcAppHandle existing = pending.putIfAbsent(secret, handle);
   CommandBuilderUtils.checkState(existing == null, "Multiple handles with the same secret.");
   return handle;
 }