title: How can I accomplish multiprocessing as a Windows service created with py2exe?
body: <p>I am trying to multiprocess a python application using the multiprocessing library. I got it working running from the command line and also running as an executable created by py2exe.</p>
  
  <p>I also got it working running the service created by py2exe by modifying forking.py as in this <a href="https://bugs.python.org/issue6461" rel="nofollow noreferrer">bug report</a>. Then get_command_line in forking.py returns the command:</p>
  
  <pre><code>"C:\Python27\pythonw.exe" "-c" "from multiprocessing.forking import main; main()" "--multiprocessing-fork" "56208"
  </code></pre>
  
  <p>This then requires you to have python installed to run the application, which is not feasible for us.</p>
  
  <p>Without modifying forking.py, the command that get_command_line returns is:</p>
  
  <pre><code>"C:\Program Files (x86)\MyApp\MyService.exe" "--multiprocessing-fork" "56228"
  </code></pre>
  
  <p>Putting log statements in forking.py in Popen.__init__, which is called from Process.start in process.py, I see the pid of the child process that is supposed to be created. Looking at the running processes on my computer, no process with that pid exists.</p>
  
  <p>How can I get this working?</p>