Skip to content

Conversation

@rodrigc
Copy link
Contributor

@rodrigc rodrigc commented Jan 30, 2017

http://twistedmatrix.com/trac/ticket/5726

Moving patch submitted by @alecu to GitHub

@codecov-io
Copy link

codecov-io commented Jan 30, 2017

Codecov Report

Merging #697 into trunk will decrease coverage by -0.02%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##            trunk     #697      +/-   ##
==========================================
- Coverage   91.27%   91.26%   -0.02%     
==========================================
  Files         844      843       -1     
  Lines      147472   147298     -174     
  Branches    13047    13021      -26     
==========================================
- Hits       134612   134431     -181     
- Misses      10623    10629       +6     
- Partials     2237     2238       +1

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 78679af...17367e6. Read the comment docs.

@rodrigc
Copy link
Contributor Author

rodrigc commented Jan 30, 2017

@alecu @opalmer please review this.

Copy link

@opalmer opalmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

I initially thought DETACHED_PROCESS might be better suited here but that completely detaches the process from the original console which is probably not the behavior most people would expect. Eventually exposing the process creation flags is probably a better approach as that would allow someone more explicit control over the behavior around process creation. Of course that's a bigger change and separate from this PR...

Copy link
Member

@glyph glyph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, modulo the minor tweaks I suggested. Thanks for noticing and fixing!

def test_flags(self):
"""
Verify that the flags passed to win32process.CreateProcess() prevent a
new console window from being created. See http://tm.tl/5726
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that including the script inline (minimized as much as possible) would be better than linking to the closed ticket.

threadAttributes, bInheritHandles, creationFlags,
newEnvironment, currentDirectory, startupinfo):
"""
See the Windows API documentation for I{CreateProcess} for further details.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

twistedchecker shouldn't be checking a callback like this, and this documentation is all duplicative with the existing docs, so this docstring should probably be elided.

@rodrigc rodrigc merged commit b276c7f into trunk Feb 27, 2017
@rodrigc rodrigc deleted the 5726-rodrigc-windows-spawnprocess-nowindow branch February 27, 2017 09:24
@rodrigc
Copy link
Contributor Author

rodrigc commented Feb 27, 2017

@alecu thanks for the submission. Sorry it took 5 years to get this fix in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants