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

AsyncProc crashes when multiple processes are started #20

Open
antoinets opened this issue Nov 20, 2019 · 0 comments
Open

AsyncProc crashes when multiple processes are started #20

antoinets opened this issue Nov 20, 2019 · 0 comments

Comments

@antoinets
Copy link

This chain of events leads to a crash:

  1. Async process p1 started.
  2. Async process p2 started.
  3. Async process p1 finishes, and the crash happens here.

Small example:

import asyncdispatch, asynctools/asyncproc

proc run() {.async.} =
  while true:
    await sleepAsync(300)
    var p = startProcess("sleep 1 && ls", options={poUsePath, poEvalCommand})
    asyncCheck p.waitForExit()

waitFor run()

Which gives the error:

Error: unhandled exception: Resource temporarily unavailable (code: 11) [IOSelectorsException]
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