Opened 10 months ago

Last modified 4 months ago

#9543 defect new

Set Windows Process Creation Flags as Optional Parameters

Reported by: Guy Sviry Owned by: Guy Sviry
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch: 9543-guysv-win32creationflags
branch-diff, diff-cov, branch-cov, buildbot


Right now, any process created with twisted.internet._dumbwin32proc.Process is getting a hard-coded creation flag CREATE_NO_WINDOW. While this is an acceptable default, sometimes the user may not want this flag.

For example, my problem with this flag is that ctrl-c interrupts in the parent process do not propagate to the child. As _dumbwin32proc.Process.signalProcess cannot send SIGINTs on windows, interrupting the parent might be the only way interrupt a child. (well, except dll injections and other nasty tricks I'd rather avoid). That could work if there were no creation flags, because then the parent and child share the process group. CREATE_NO_WINDOW spawn the child in another console (Actually, no console), where parent interrupts can't reach.

I say, Move the creation flags as an optional parameter. keep CREATE_NO_WINDOW as default behavior, but let the user to fine-tune the flags.

Change History (3)

comment:1 Changed 9 months ago by Guy Sviry

Branch: 9543-guysv-win32creationflags
Keywords: review added

comment:2 Changed 9 months ago by Glyph

Interested reviewers, the relevant PR is here:

comment:3 Changed 4 months ago by Glyph

Keywords: review removed
Owner: set to Guy Sviry
Note: See TracTickets for help on using tickets.