Skip to content
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

RavenDB-12319 spawn processes without handle inheritance to avoid getting HttpRequestException because of closed handle #8028

Merged
merged 3 commits into from
Nov 19, 2018

Conversation

ppekrol
Copy link
Member

@ppekrol ppekrol commented Nov 14, 2018

This is still WIP, I want CI to start testing this

…ting HttpRequestException because of closed handle
@ppekrol ppekrol changed the title RavenDB-12319 spawn processes without handle inheritance to avoid getting HttpRequestException because of closed handle [DO NOT MERGE] RavenDB-12319 spawn processes without handle inheritance to avoid getting HttpRequestException because of closed handle Nov 14, 2018

var process = new RavenProcess();
if (process.StartWithCreateProcess(startInfo) == false)
throw new InvalidOperationException();
Copy link
Member

Choose a reason for hiding this comment

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

Need error handling here.


private unsafe bool StartWithCreateProcess(ProcessStartInfo startInfo)
{
var commandLine = BuildCommandLine(startInfo.FileName, startInfo.Arguments);
Copy link
Member

Choose a reason for hiding this comment

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

How much of this is Windows only?

Copy link
Member Author

Choose a reason for hiding this comment

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

All

@ppekrol
Copy link
Member Author

ppekrol commented Nov 16, 2018

@ayende I've compiled new System.Diagnostics.Process.dll (for Windows only) with InheritHandles option.

@ppekrol
Copy link
Member Author

ppekrol commented Nov 16, 2018

@ayende I will merge this on Monday, after release

@ppekrol ppekrol changed the title [DO NOT MERGE] RavenDB-12319 spawn processes without handle inheritance to avoid getting HttpRequestException because of closed handle RavenDB-12319 spawn processes without handle inheritance to avoid getting HttpRequestException because of closed handle Nov 16, 2018
@ppekrol ppekrol merged commit a89b4a7 into ravendb:v4.1 Nov 19, 2018
@ppekrol ppekrol deleted the RavenDB-12319 branch January 31, 2020 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants