[*] Fix deadlock on enter, when dispatching the command results in a grug handler being executed, followed by a deadlock during flush
[*] also wtf is this
This commit is contained in:
parent
c935b892c7
commit
3c4cece69d
@ -711,60 +711,66 @@ namespace Aurora::Console::ConsoleTTY
|
|||||||
|
|
||||||
void TTYConsole::NoncanonicalOnEnter()
|
void TTYConsole::NoncanonicalOnEnter()
|
||||||
{
|
{
|
||||||
AU_LOCK_GUARD(this->historyLock->AsWritable());
|
AuString line;
|
||||||
|
|
||||||
if (this->inputField.inputField.size())
|
|
||||||
{
|
|
||||||
|
|
||||||
#if defined(AURORA_IS_MODERNNT_DERIVED)
|
{
|
||||||
if (this->inputField.inputField == "!s")
|
AU_LOCK_GUARD(this->historyLock->AsWritable());
|
||||||
{
|
|
||||||
EnterScrollMode();
|
if (this->inputField.inputField.size())
|
||||||
}
|
|
||||||
else if (this->inputField.inputField == "!c")
|
|
||||||
{
|
|
||||||
LeaveScrollMode();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
if (this->inputField.inputField == "!b")
|
|
||||||
{
|
|
||||||
this->iScrollPos = -1;
|
|
||||||
this->bTriggerRedraw = true;
|
|
||||||
}
|
|
||||||
else if (this->inputField.inputField == "!t")
|
|
||||||
{
|
|
||||||
this->iScrollPos = 0;
|
|
||||||
this->bTriggerRedraw = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
|
|
||||||
#if defined(AURORA_IS_MODERNNT_DERIVED)
|
#if defined(AURORA_IS_MODERNNT_DERIVED)
|
||||||
if (this->inputField.inputField == "help")
|
if (this->inputField.inputField == "!s")
|
||||||
{
|
{
|
||||||
AuLogInfo("ConsoleTTY: Type !s to enter scroll mode, type !c to enter host-os controlled copy/paste mode (quick-edit)");
|
EnterScrollMode();
|
||||||
}
|
}
|
||||||
#endif
|
else if (this->inputField.inputField == "!c")
|
||||||
#if defined(AURORA_IS_POSIX_DERIVED)
|
|
||||||
if (this->inputField.inputField == "help")
|
|
||||||
{
|
{
|
||||||
AuLogInfo("ConsoleTTY: Hold control + arrow key up/down to scroll.");
|
LeaveScrollMode();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
#endif
|
#endif
|
||||||
if (this->inputField.inputField == "help")
|
if (this->inputField.inputField == "!b")
|
||||||
{
|
{
|
||||||
AuLogInfo("ConsoleTTY: use the command !t to scroll to the top, the command !b to lock-scroll to the bottom.");
|
this->iScrollPos = -1;
|
||||||
|
this->bTriggerRedraw = true;
|
||||||
|
}
|
||||||
|
else if (this->inputField.inputField == "!t")
|
||||||
|
{
|
||||||
|
this->iScrollPos = 0;
|
||||||
|
this->bTriggerRedraw = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
#if defined(AURORA_IS_MODERNNT_DERIVED)
|
||||||
|
if (this->inputField.inputField == "help")
|
||||||
|
{
|
||||||
|
AuLogInfo("ConsoleTTY: Type !s to enter scroll mode, type !c to enter host-os controlled copy/paste mode (quick-edit)");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#if defined(AURORA_IS_POSIX_DERIVED)
|
||||||
|
if (this->inputField.inputField == "help")
|
||||||
|
{
|
||||||
|
AuLogInfo("ConsoleTTY: Hold control + arrow key up/down to scroll.");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
if (this->inputField.inputField == "help")
|
||||||
|
{
|
||||||
|
AuLogInfo("ConsoleTTY: use the command !t to scroll to the top, the command !b to lock-scroll to the bottom.");
|
||||||
|
}
|
||||||
|
|
||||||
|
line = this->inputField.inputField;
|
||||||
}
|
}
|
||||||
|
|
||||||
AuConsole::DispatchRawLine(this->inputField.inputField);
|
AuTryInsert(this->history, this->inputField.inputField);
|
||||||
}
|
}
|
||||||
|
|
||||||
AuTryInsert(this->history, this->inputField.inputField);
|
this->inputField.Clear();
|
||||||
|
|
||||||
|
OnEnter();
|
||||||
}
|
}
|
||||||
|
|
||||||
this->inputField.Clear();
|
AuConsole::DispatchRawLine(line);
|
||||||
|
|
||||||
OnEnter();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TTYConsole::NoncanonicalOnMenuLeft()
|
void TTYConsole::NoncanonicalOnMenuLeft()
|
||||||
|
@ -222,8 +222,9 @@ namespace Aurora::Debug
|
|||||||
StackTrace ret;
|
StackTrace ret;
|
||||||
EXCEPTION_RECORD ex {};
|
EXCEPTION_RECORD ex {};
|
||||||
|
|
||||||
if (!bNoExit)
|
if (fatal && !bNoExit)
|
||||||
{
|
{
|
||||||
|
// TODO: why? remove?
|
||||||
if (!AuExchange(forceFail, true))
|
if (!AuExchange(forceFail, true))
|
||||||
{
|
{
|
||||||
Exit::PostLevel(AuThreads::GetThread(), Exit::ETriggerLevel::eFatalException);
|
Exit::PostLevel(AuThreads::GetThread(), Exit::ETriggerLevel::eFatalException);
|
||||||
|
Loading…
Reference in New Issue
Block a user