Description

moin-1.9.9 calls subprocess on windows with wrong value for parameter 'preexec_fn'. 'preexec' is not supported on Windows and must be None. The bug was introduced in moin-1.9.9. moin-1.9.8 is OK.

Steps to reproduce

  1. do something which uses subprocess.py (e.g. indexing of an attachment for xapian)

Component selection

Details

MoinMoin Version

1.9.9

OS and Version

Windows Server 2013

Python Version

2.7.14

Server Setup

Cheroot, Apache 2.4 as reverse proxy

Server Details

-

Language you are using the wiki in (set in the browser/UserPreferences)

en

Workaround

Patch subprocess.py:

--- SubProcess.py       (revision 407)
+++ SubProcess.py       (revision 408)
@@ -16,9 +16,8 @@
     Execute a shell <cmd>, send <stdin> to it, kill it after <timeout> if it
     is still running. Return stdout, stderr, rc.
     """
-    def preexec_fn():
-        if not subprocess.mswindows:
-            os.setsid()  # start a new session
+    # start a new session (preexec_fn is Unix only)
+    preexec_fn = None if subprocess.mswindows else os.setsid()
 
     def kill_it(p):
         if not subprocess.mswindows:

Discussion

Thanks to DavidLinke for finding / fixing this!

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/1.9.9SubprocessBugWindows (last edited 2018-08-16 17:54:46 by ThomasWaldmann)