Skip to content

Commit

Permalink
Don't kill processes with parent if on linux
Browse files Browse the repository at this point in the history
Not yet implemented
  • Loading branch information
Noggog committed Dec 24, 2024
1 parent cde4542 commit 7caa8b1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
7 changes: 5 additions & 2 deletions Spriggit.Engine/CliEntryPoint.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Diagnostics;
using System.IO.Abstractions;
using System.Runtime.InteropServices;
using Mutagen.Bethesda;
using Mutagen.Bethesda.Plugins;
using Noggog;
Expand Down Expand Up @@ -59,7 +60,8 @@ public async Task Serialize(
new ProcessStartInfo(_pathToExe)
{
Arguments = args
});
},
killWithParent: !RuntimeInformation.IsOSPlatform(OSPlatform.Linux));
using var outputSub = processWrapper.Output
.Subscribe(x =>
{
Expand Down Expand Up @@ -88,7 +90,8 @@ public async Task Deserialize(string inputPath, string outputPath, DirectoryPath
new ProcessStartInfo(_pathToExe)
{
Arguments = args
});
},
killWithParent: !RuntimeInformation.IsOSPlatform(OSPlatform.Linux));
using var outputSub = processWrapper.Output
.Subscribe(x =>
{
Expand Down
7 changes: 5 additions & 2 deletions Spriggit.Engine/DotNetToolEntryPoint.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Diagnostics;
using System.IO.Abstractions;
using System.Runtime.InteropServices;
using Mutagen.Bethesda;
using Mutagen.Bethesda.Plugins;
using Noggog;
Expand Down Expand Up @@ -65,7 +66,8 @@ public async Task Serialize(ModPath modPath, DirectoryPath outputDir, DirectoryP
new ProcessStartInfo(exePath)
{
Arguments = args
});
},
killWithParent: !RuntimeInformation.IsOSPlatform(OSPlatform.Linux));
using var outputSub = processWrapper.Output
.Subscribe(x =>
{
Expand Down Expand Up @@ -94,7 +96,8 @@ public async Task Deserialize(string inputPath, string outputPath, DirectoryPath
new ProcessStartInfo(exePath)
{
Arguments = args
});
},
killWithParent: !RuntimeInformation.IsOSPlatform(OSPlatform.Linux));
using var outputSub = processWrapper.Output
.Subscribe(x =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@ public ConstructDotNetToolEndpoint(
try
{
var args = $"tool install {ident.Id} --version {ident.Version} --tool-path \"{toolsPath}\"";
_logger.Information("Running DotNet Entry point serialize with Args: {Args}", args);
_logger.Information("Running DotNet Entry point install with Args: {Args}", args);
using var processWrapper = _processFactory.Create(
new ProcessStartInfo("dotnet")
{
Arguments = args,
},
cancel: cancellationToken);
cancel: cancellationToken,
killWithParent: false);
using var outputSub = processWrapper.Output
.Subscribe(x =>
{
Expand Down

0 comments on commit 7caa8b1

Please sign in to comment.