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
- do something which uses subprocess.py (e.g. indexing of an attachment for xapian)
Component selection
- MoinMoin/util/subprocess.py
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
- Priority:
- Assigned to:
Status: fixed in git, will be in 1.9.10 https://github.com/moinwiki/moin-1.9/pull/8
