summaryrefslogtreecommitdiff
path: root/Kernel/TTY/TTY.cpp
diff options
context:
space:
mode:
authorBrian Gianforcaro <b.gianfo@gmail.com>2020-08-05 02:13:30 -0700
committerAndreas Kling <kling@serenityos.org>2020-08-05 14:36:48 +0200
commit946c96dd5696116048097340db86a26ce9aa7a58 (patch)
tree6ffd331ca633fd760d66ae90c63eb159f2895ca2 /Kernel/TTY/TTY.cpp
parentd67069d92246a12ef3e27dc4890698ea1d83eccc (diff)
downloadserenity-946c96dd5696116048097340db86a26ce9aa7a58.zip
Kernel: Suppress remaining unobserved KResult return codes
These are all cases where there is no clear and easy fix, I've left FIXME bread crumbs so that these can hopefully be fixed over time.
Diffstat (limited to 'Kernel/TTY/TTY.cpp')
-rw-r--r--Kernel/TTY/TTY.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/Kernel/TTY/TTY.cpp b/Kernel/TTY/TTY.cpp
index 589149e259..1743bf86d2 100644
--- a/Kernel/TTY/TTY.cpp
+++ b/Kernel/TTY/TTY.cpp
@@ -55,9 +55,8 @@ void TTY::set_default_termios()
KResultOr<size_t> TTY::read(FileDescription&, size_t, u8* buffer, size_t size)
{
if (Process::current()->pgid() != pgid()) {
- KResult result = Process::current()->send_signal(SIGTTIN, nullptr);
- if (result.is_error())
- return result;
+ // FIXME: Should we propigate this error path somehow?
+ (void)Process::current()->send_signal(SIGTTIN, nullptr);
return KResult(-EINTR);
}
@@ -93,9 +92,8 @@ KResultOr<size_t> TTY::read(FileDescription&, size_t, u8* buffer, size_t size)
KResultOr<size_t> TTY::write(FileDescription&, size_t, const u8* buffer, size_t size)
{
if (Process::current()->pgid() != pgid()) {
- KResult result = Process::current()->send_signal(SIGTTOU, nullptr);
- if (result.is_error())
- return result;
+ // FIXME: Should we propigate this error path somehow?
+ (void)Process::current()->send_signal(SIGTTOU, nullptr);
return KResult(-EINTR);
}
@@ -255,7 +253,8 @@ void TTY::generate_signal(int signal)
InterruptDisabler disabler; // FIXME: Iterate over a set of process handles instead?
Process::for_each_in_pgrp(pgid(), [&](auto& process) {
dbg() << tty_name() << ": Send signal " << signal << " to " << process;
- process.send_signal(signal, nullptr);
+ // FIXME: Should this error be propagated somehow?
+ (void)process.send_signal(signal, nullptr);
return IterationDecision::Continue;
});
}