Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive process status being returned by process.poll() - Windows 11 #92

Open
ayeganov opened this issue Jan 23, 2023 · 0 comments

Comments

@ayeganov
Copy link

ayeganov commented Jan 23, 2023

I spawn a single process that I expect to run for a long time. The child process does not spawn other children. It does run without any problems or errors, until the process monitoring it starts reporting that it has exited:

Here is the the function that starts reporting false when the process in fact is still happy and running:

bool ProcessImpl::is_running()
{
  auto [code, ec] = process_.poll(reproc::event::exit, kDefaultPollTimeout);
  if(ec)
  {
    std::cout << "ProcessImpl::is_running() failed: " << ec.message() << std::endl;
  }
  return code == 0 && !ec;
}

Am I forgetting to check something or setting something incorrectly? I have looked through the list of gotchas and don't see anything obvious that would tell me what could be going wrong. Any help would be greatly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant