-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hide the tor dos window on windows #32
Conversation
I would suggest something more generic like Also, it seems your latest commit changed the package names. |
aaah shoot I'll use a separate branch. The package rename was just for internal testing, with our weird built system. wasn't meant to update here and cool, once I get our system building, I'll take a look at making it more generic as suggested :) |
01b7836
to
e063c10
Compare
Ok here's the proper PR as I believe you requested. And I moved the hide specific attr stuff into my code base and it works :) |
process/process.go
Outdated
} | ||
|
||
// NewCreator creates a Creator for external Tor process execution based on the | ||
// given exe path. | ||
func NewCreator(exePath string) Creator { | ||
return &exeProcessCreator{exePath} | ||
func NewCreator(exePath string, newCmd CmdCreatorFunc) Creator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks backwards compatibility. Rather, I was thinking of having type CmdCreatorFunc func(ctx context.Context, args ...string) (*exec.Cmd, error)
and then have that implement Creator
via something like func (c CmdCreatorFunc) New(ctx context.Context, args ...string) (Process, error) { /* send back error or &exeProcess after calling c(ctx, args) */ }
. And leave the rest of the code alone (or even better, change NewCreator
to create and return a CmdCreatorFunc
).
Sorry I'm too busy to do this myself, I hope that's clear.
oh cool, didn't know you could do that. sorry for being dense. I think this is what you were asking for? |
No problem, sorry for being pedantic. That's exactly what I was thinking! Can you do me a favor and run a |
control over cmd creation
done! (sorry havent set my windows IDE to auto gofmt like I'm used to) |
Thanks |
Currently when running on windows, tor.Start() will create a dos console box and leave it displaying with tor running in it.
This is a proposed PR that would hide it on windows