Normally, it's the TTY layer's job to translate '\n' into the separate
'\r' and '\n' control characters needed by the terminal to move the
cursor to the first column of the next line.
(see 5d80debc1f).
In HackStudio, we directly inject data into the TerminalWidget to
display command status. This means that this automatic translation
doesn't happen, so we need to explicitly give it the '\r' too.
When we run the Preprocessor from the CppComprehensionEngine of
the language server, we don't want the preprocessor to crash if it
encounters an invalid preprocessor statement (for example, an #endif
statement without an accompanying previous #if statement).
To achieve this, this commit adds an "ignore_invalid_statements" flag
to the preprocessor which is set by the CppComprehensionEngine.
Fixes#11064.
The maximal crash frequency of the language server was previously 3
seconds, but in practice it was too high.
When working with larger projects the language server can get into a
"crash and respawn" loop that takes more than 3 seconds.
10 seconds seems like a reasonable threshold beyond which we no longer
attempt to respawn the server.
When respawning the language server, we only need to send the content
of opened files to the server.
The on-disk content of files that are not currently open is up to
date, so the server can read them on its own.
Before this change, the destructor of FilteringProxyModel
would crash if the parent model had been destroyed earlier.
This unifies the behaviour of FilteringProxyModel with
SortingProxyModel in this respect.
Since we're iterating over multiple regions that interesect with the
requested range, just one of them having the requested access flags
is not enough to finish the syscall early.
SIGSTKFLT is a signal that signifies a stack fault in a x87 coprocessor,
this signal is not POSIX and also unused by Linux and the BSDs, so let's
use SIGSEGV so programs that setup signal handlers for the common
signals could still handle them in serenity.
The advices are almost always exclusive of one another, and while POSIX
does not define madvise, most other unix-like and *BSD systems also only
accept a singular value per call.