pike.git / lib / modules / Process.pmod

version» Context lines:

pike.git/lib/modules/Process.pmod:341: Inside #if constant(Stdio.__HAVE_SEND_FD__)
   }       protected void do_poll(float t)    {    mixed err = catch {    process_backend && process_backend(t);    return;    };    // Filter errors about the backend already running.    if (arrayp(err) && sizeof(err) && -  stringp(err[0]) && has_prefix(err[0], "Backend already ")) return; +  stringp(err[0]) && has_prefix(err[0], "Backend already ")) { +  sleep(t); +  return; +  }    throw(err);    }       protected void do_poll_loop()    {    process_poll = UNDEFINED;    if (!process_backend) return;    do_poll(0.0);    process_poll = call_out(do_poll_loop, 0.1);    }
pike.git/lib/modules/Process.pmod:368: Inside #if constant(Stdio.__HAVE_SEND_FD__)
      int(-1..2) status()    {    do_poll(0.0);    return ::status();    }       int wait()    {    if (process_backend) { -  do_poll(0.0); -  while (__status <= 0) { -  do_poll(3600.0); -  } +  float t = 0.0; +  do { +  do_poll(t); +  if (t < 1.0) t += 0.1; +  } while (__status <= 0);    return __result;    }    return ::wait();    }   #endif /* __HAVE_SEND_FD__ */       protected void destroy() {    remove_call_out(watcher);    remove_call_out(killer);   #if constant(Stdio.__HAVE_SEND_FD__)