Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#10297 closed enhancement (fixed)

Set CREATE_NO_WINDOW in tor_spawn_background

Reported by: dcf Owned by:
Priority: Medium Milestone: Tor: 0.2.5.x-final
Component: Core Tor/Tor Version: Tor: 0.2.4.18-rc
Severity: Keywords: tor-client tor-pt windows 024-backport tbb-tor-backported-3.5.2
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

The CREATE_NO_WINDOW flag prevents the creation of a console window popup on Windows. We need it for pluggable transport executables under the 3.x browser bundle—otherwise you get blank console windows when you start it up with transports enabled.

http://msdn.microsoft.com/en-us/library/ms684863.aspx#CREATE_NO_WINDOW

The project to make pluggable transports bundles based on 3.x TBB is #9444. A summary of the CREATE_NO_WINDOW situation is in comment:30:ticket:9444.
In short: The old browser bundles that used Vidalia used to set this flag when launching tor itself; it was apparently inherited by the pluggable transports launched by tor. In the 3.x bundles, tor is launched by some JavaScript code, which doesn't have the ability to set CREATE_NO_WINDOW. tor itself is now being compiled with the -mwindows option, so that it is a GUI application, not a console application, and doesn't show a console window in any case. This workaround doesn't work for pluggable transports, because they need to be able to write control messages to stdout.

In a function called tor_spawn_background it makes sense that console windows shouldn't be popping up. In addition to pluggable transports, I think the function is used for tor-fw-helper.

There may be other ways to solve the problem of console windows, but I haven't been able to think of them.

Child Tickets

Attachments (4)

0001-Set-CREATE_NO_WINDOW-in-tor_spawn_background.patch (1.9 KB) - added by dcf 6 years ago.
before.png (61.6 KB) - added by dcf 6 years ago.
How it looks without the patch.
after.png (85.2 KB) - added by dcf 6 years ago.
How it looks with the patch.
0001-Set-CREATE_NO_WINDOW-in-tor_spawn_background-bis.patch (2.3 KB) - added by dcf 6 years ago.
Patch with changes file.

Download all attachments as: .zip

Change History (11)

Changed 6 years ago by dcf

Attachment: before.png added

How it looks without the patch.

Changed 6 years ago by dcf

Attachment: after.png added

How it looks with the patch.

comment:1 Changed 6 years ago by dcf

Status: newneeds_review

These screenshots show how it looks before and after the patch is applied, on Windows 8.

How it looks without the patch.

How it looks with the patch.

comment:2 Changed 6 years ago by nickm

Keywords: tor-client tor-pt windows added
Milestone: Tor: 0.2.4.x-final

Seems fine to me; needs a changes file. Have other pluggable-transport folks tried this out? Should we call this targeted for 0.2.4 or for 0.2.5? (In other words, how disruptive is it to *not* have this change until 0.2.5?)

Changed 6 years ago by dcf

Patch with changes file.

comment:3 in reply to:  2 Changed 6 years ago by dcf

Replying to nickm:

Seems fine to me; needs a changes file. Have other pluggable-transport folks tried this out? Should we call this targeted for 0.2.4 or for 0.2.5? (In other words, how disruptive is it to *not* have this change until 0.2.5?)

I attached a new patch with a changes file. I think targeting for 0.2.5 is fine. We'll just eventually need some tag against which we can build the pluggable transports bundle. We can even use a local patch if we're building bundles with 0.2.4. Erinn offered to try building a bundle using this patch.

comment:4 Changed 6 years ago by nickm

Keywords: 024-backport added
Milestone: Tor: 0.2.4.x-finalTor: 0.2.5.x-final

Okay. If it's for 0.2.5, then I think given the info we have, that's adequate to merge. I've merged this into 0.2.5 and marked it for possible backport in 0.2.4. Thanks!

comment:5 Changed 6 years ago by dcf

Resolution: fixed
Status: needs_reviewclosed

comment:6 Changed 6 years ago by mikeperry

FYI: We have been backporting this patch to the tor in TBB since TBB 3.5.2 and it has been fine.

comment:7 Changed 6 years ago by mikeperry

Keywords: tbb-tor-backported-3.5.2 added
Note: See TracTickets for help on using tickets.