mirror of
https://github.com/2dust/v2rayN.git
synced 2025-12-23 03:39:45 +05:00
Fix kill process for linux
This commit is contained in:
@@ -155,6 +155,12 @@ public class CoreHandler
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (_linuxSudoPid > 0)
|
||||||
|
{
|
||||||
|
await KillProcessAsLinuxSudo();
|
||||||
|
_linuxSudoPid = -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (_process != null)
|
if (_process != null)
|
||||||
{
|
{
|
||||||
await ProcUtils.ProcessKill(_process, true);
|
await ProcUtils.ProcessKill(_process, true);
|
||||||
@@ -166,12 +172,6 @@ public class CoreHandler
|
|||||||
await ProcUtils.ProcessKill(_processPre, true);
|
await ProcUtils.ProcessKill(_processPre, true);
|
||||||
_processPre = null;
|
_processPre = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_linuxSudoPid > 0)
|
|
||||||
{
|
|
||||||
await KillProcessAsLinuxSudo();
|
|
||||||
}
|
|
||||||
_linuxSudoPid = -1;
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -390,7 +390,7 @@ public class CoreHandler
|
|||||||
|
|
||||||
await File.WriteAllTextAsync(shFilePath, sb.ToString());
|
await File.WriteAllTextAsync(shFilePath, sb.ToString());
|
||||||
await Utils.SetLinuxChmod(shFilePath);
|
await Utils.SetLinuxChmod(shFilePath);
|
||||||
Logging.SaveLog(shFilePath);
|
//Logging.SaveLog(shFilePath);
|
||||||
|
|
||||||
return shFilePath;
|
return shFilePath;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user