Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-7357

Clean up how the shell launches processes

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.2.0
    • Component/s: Shell
    • Server Tooling & Methods

      Currently there are multiple ways to launch processes in the shell, some of which return the port number of a started mongo process and never join with it, others which wait for the process to terminate and join with it and return the exit code. There is no good way to get the exit code of a process launched that we don't expect to terminate immediately (like a mongod for example). We should have just one interface for launching processes that is flexible enough to handle both long-running mongod processes and short-lived processes like tools.

      There should be one function that launches a process and returns its PID, and another that joins with a PID and returns it's exit code. Those should be the only native code C++ functions built into the shell. The existing javascript functions for launching processes (runMongoProgram, startMongoProgram, runMongoProgramNoConnect, etc.) should then be re-written using these new C++ functions for backwards compatibility sake, and marked as deprecated. New, clean javascript functions should then be written for all new tests that need to launch new sub-processes. This will also need a clean way to handle and distinguish the cases where the newly launches process should and should not have username and password arguments appended to it's command line launch statement for running tests with auth.

            Assignee:
            backlog-server-stm Backlog - Server Tooling and Methods (STM) (Inactive)
            Reporter:
            spencer@mongodb.com Spencer Brody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: