Skip to content

Commit

Permalink
Fixed Ctrl-C Handling on de-elevation (fixes #103)
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardog committed Aug 18, 2021
1 parent fe1c8c9 commit cab27ed
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/gsudo/Commands/RunCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ private static int RunWithoutService(string exeName, string args, ElevationReque
Logger.Instance.Log("Already running as the specified user/permission-level. Running in-process...", LogLevel.Debug);
var sameIntegrity = (int)InputArguments.GetIntegrityLevel() == ProcessHelper.GetCurrentIntegrityLevel();
// No need to escalate. Run in-process
Native.ConsoleApi.SetConsoleCtrlHandler(ConsoleHelper.IgnoreConsoleCancelKeyPress, true);

if (!string.IsNullOrEmpty(elevationRequest.Prompt))
{
Expand Down

0 comments on commit cab27ed

Please sign in to comment.