diff --git a/src/apps/terminal/Shell.cpp b/src/apps/terminal/Shell.cpp index 8ffffb5f18..dc6c189a69 100644 --- a/src/apps/terminal/Shell.cpp +++ b/src/apps/terminal/Shell.cpp @@ -194,16 +194,24 @@ Shell::UpdateWindowSize(int rows, int columns) struct winsize winSize; winSize.ws_row = rows; winSize.ws_col = columns; +#ifdef __HAIKU__ + if (ioctl(fFd, TIOCSWINSZ, &winSize) != 0) + return errno; + return B_OK; +#else ioctl(fFd, TIOCSWINSZ, &winSize); return Signal(SIGWINCH); +#endif } +#ifndef __HAIKU__ status_t Shell::Signal(int signal) { return send_signal(-fProcessID, signal); } +#endif status_t diff --git a/src/apps/terminal/Shell.h b/src/apps/terminal/Shell.h index d8037983b5..75d6ad5836 100644 --- a/src/apps/terminal/Shell.h +++ b/src/apps/terminal/Shell.h @@ -32,7 +32,9 @@ public: ssize_t Write(const void *buffer, size_t numBytes); status_t UpdateWindowSize(int row, int columns); +#ifndef __HAIKU__ status_t Signal(int signal); +#endif status_t GetAttr(struct termios &attr); status_t SetAttr(struct termios &attr); diff --git a/src/apps/terminal/TermView.cpp b/src/apps/terminal/TermView.cpp index 21de80e8d5..52a2864d87 100644 --- a/src/apps/terminal/TermView.cpp +++ b/src/apps/terminal/TermView.cpp @@ -1471,6 +1471,7 @@ TermView::KeyDown(const char *bytes, int32 numBytes) currentMessage->FindInt32("key", &key); currentMessage->FindInt32("raw_char", &rawChar); +#ifndef __HAIKU__ // If bytes[0] equal intr character, // send signal to shell process group. struct termios tio; @@ -1479,6 +1480,7 @@ TermView::KeyDown(const char *bytes, int32 numBytes) if (tio.c_lflag & ISIG) fShell->Signal(SIGINT); } +#endif // Terminal filters RET, ENTER, F1...F12, and ARROW key code. // TODO: Cleanup