Skip to content

Commit

Permalink
Continue 6348.2
Browse files Browse the repository at this point in the history
  • Loading branch information
alabuzhev committed Jul 20, 2024
1 parent 698ddd5 commit 5f0ac24
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
5 changes: 5 additions & 0 deletions far/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
--------------------------------------------------------------------------------
drkns 2024-07-20 09:18:53+01:00 - build 6349

1. Continue 6348.2.

--------------------------------------------------------------------------------
drkns 2024-07-18 01:23:45+01:00 - build 6348

Expand Down
15 changes: 15 additions & 0 deletions far/execute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,7 @@ static void after_process_creation(
{
case execute_info::wait_mode::no_wait:
resume_process(false);
console.command_finished();
return;

case execute_info::wait_mode::if_needed:
Expand All @@ -567,11 +568,16 @@ static void after_process_creation(
resume_process(NeedWaiting);

if (!NeedWaiting)
{
console.command_finished();
return;
}

Process = wait_for_process_or_detach(std::move(Process), KeyNameToKey(Global->Opt->ConsoleDetachKey), ConsoleSize, ConsoleWindowRect);
if (Process)
log_process_exit_code(Info, Process, UsingComspec);
else
console.command_finished();
}
return;

Expand Down Expand Up @@ -798,7 +804,11 @@ static bool execute_impl(
return true;

if (os::last_error().Win32Error == ERROR_EXE_MACHINE_TYPE_MISMATCH)
{
SCOPED_ACTION(os::last_error_guard);
ExtendedActivator(false);
return false;
}
}

ExtendedActivator(Info.WaitMode != execute_info::wait_mode::no_wait);
Expand Down Expand Up @@ -912,7 +922,12 @@ void Execute(execute_info& Info, function_ref<void(bool)> const ConsoleActivator
const auto ErrorState = os::last_error();

if (ErrorState.Win32Error == ERROR_CANCELLED)
{
console.command_finished();
return;
}

console.command_finished(ErrorState.Win32Error);

std::vector<string> Strings;
if (UsingComspec)
Expand Down
2 changes: 1 addition & 1 deletion far/vbuild.m4
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6348
6349

0 comments on commit 5f0ac24

Please sign in to comment.