Built-in shell does not stop executing JS on Ctrl+C

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • None
    • 5
    • None

      For long-running JS like

      for (let i = 0; i < 10000; i++) db.test.insertOne({});
      

      pressing Ctrl+C will stop the loop in the mongosh CLI, but not in the embedded shell.

      Note that in the mongosh CLI, we check for interruptions before every call:

      https://github.com/mongodb-js/mongosh/blob/a1f1964cdd632ed63fa1fd8a19091d80f3f1bf68/packages/shell-api/src/decorators.ts#L235

            Assignee:
            Unassigned
            Reporter:
            Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: