mirror of
https://github.com/2dust/v2rayN.git
synced 2025-05-14 04:08:07 +00:00
Fix kill process for linux
This commit is contained in:
parent
c6d347d49a
commit
0032a3d27a
1 changed files with 7 additions and 7 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue