diff options
author | Brian Gianforcaro <b.gianfo@gmail.com> | 2020-08-05 02:07:31 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-05 14:36:48 +0200 |
commit | d67069d92246a12ef3e27dc4890698ea1d83eccc (patch) | |
tree | bf13f664150aec3cb48ffcf4b89981d42040a2df /Kernel/TTY/TTY.cpp | |
parent | c4c6d9367d96bdcf886b26839069ab486100eab6 (diff) | |
download | serenity-d67069d92246a12ef3e27dc4890698ea1d83eccc.zip |
Kernel: Propagate a few KResults properly in FileSystem subsystems
Propagating un-obsevered KResults up the stack.
Diffstat (limited to 'Kernel/TTY/TTY.cpp')
-rw-r--r-- | Kernel/TTY/TTY.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Kernel/TTY/TTY.cpp b/Kernel/TTY/TTY.cpp index 65c4c247c6..589149e259 100644 --- a/Kernel/TTY/TTY.cpp +++ b/Kernel/TTY/TTY.cpp @@ -55,7 +55,9 @@ void TTY::set_default_termios() KResultOr<size_t> TTY::read(FileDescription&, size_t, u8* buffer, size_t size) { if (Process::current()->pgid() != pgid()) { - Process::current()->send_signal(SIGTTIN, nullptr); + KResult result = Process::current()->send_signal(SIGTTIN, nullptr); + if (result.is_error()) + return result; return KResult(-EINTR); } @@ -91,7 +93,9 @@ 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()) { - Process::current()->send_signal(SIGTTOU, nullptr); + KResult result = Process::current()->send_signal(SIGTTOU, nullptr); + if (result.is_error()) + return result; return KResult(-EINTR); } |