Browse Source

Remove mono lib (#118)

* Remove mono lib

* formatting
davidfowl/dependencies
Justin Kotalik 7 years ago
committed by GitHub
parent
commit
de7f015442
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/Microsoft.Tye.Core/Microsoft.Tye.Core.csproj
  2. 6
      src/Microsoft.Tye.Core/ProcessUtil.cs

1
src/Microsoft.Tye.Core/Microsoft.Tye.Core.csproj

@ -12,7 +12,6 @@
<ItemGroup>
<PackageReference Include="KubernetesClient" Version="1.6.11" />
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
<PackageReference Include="semver" Version="2.0.6" />
<PackageReference Include="Sln" Version="0.3.0" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.20071.2" />

6
src/Microsoft.Tye.Core/ProcessUtil.cs

@ -9,12 +9,14 @@ using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Mono.Unix.Native;
namespace Microsoft.Tye
{
public static class ProcessUtil
{
[DllImport("libc", SetLastError = true, EntryPoint = "kill")]
private static extern int sys_kill(int pid, int sig);
public static async Task<ProcessResult> RunAsync(
string filename,
string arguments,
@ -119,7 +121,7 @@ namespace Microsoft.Tye
{
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
Syscall.kill(process.Id, Signum.SIGINT);
sys_kill(process.Id, sig: 2); // SIGINT
var cancel = new CancellationTokenSource();

Loading…
Cancel
Save