Kernel: Handle TIOC{G,S}WINSZ on pipes

GCC likes to do this a lot and debug logging is excessive
This commit is contained in:
2026-05-09 21:35:51 +03:00
parent 9f4271f6d8
commit 0bf7328e04
2 changed files with 15 additions and 0 deletions

View File

@@ -44,6 +44,8 @@ namespace Kernel
virtual bool has_error_impl() const override { return m_reading_count == 0; }
virtual bool has_hungup_impl() const override { return m_writing_count == 0; }
virtual BAN::ErrorOr<long> ioctl_impl(int, void*) override;
private:
Pipe(const Credentials&);

View File

@@ -5,6 +5,7 @@
#include <fcntl.h>
#include <sys/epoll.h>
#include <sys/ioctl.h>
namespace Kernel
{
@@ -123,4 +124,16 @@ namespace Kernel
return to_copy;
}
BAN::ErrorOr<long> Pipe::ioctl_impl(int cmd, void* arg)
{
switch (cmd)
{
case TIOCGWINSZ:
case TIOCSWINSZ:
return BAN::Error::from_errno(EINVAL);
}
return Inode::ioctl_impl(cmd, arg);
}
}