From 901e5756cba6cbc992b71815892d9635d32a490b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sat, 10 May 2008 11:22:18 +0000 Subject: [PATCH] Indeed we don't need this signal hack for BeOS, we just need to tell it the pgid. That reduces the number of things to remove later ;) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25411 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/terminal/Shell.cpp | 17 +++-------------- src/apps/terminal/Shell.h | 3 --- src/apps/terminal/TermView.cpp | 11 ----------- 3 files changed, 3 insertions(+), 28 deletions(-) diff --git a/src/apps/terminal/Shell.cpp b/src/apps/terminal/Shell.cpp index dc6c189a69..acc74fb555 100644 --- a/src/apps/terminal/Shell.cpp +++ b/src/apps/terminal/Shell.cpp @@ -194,26 +194,12 @@ 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 Shell::GetAttr(struct termios &attr) { @@ -496,6 +482,9 @@ Shell::_Spawn(int row, int col, const char *encoding, int argc, const char **arg tcsetpgrp(0, getpgrp()); // set this process group ID as the controlling terminal +#ifndef __HAIKU__ + ioctl(0, 'pgid', getpid()); +#endif /* pty open and set termios successful. */ handshake.status = PTY_OK; diff --git a/src/apps/terminal/Shell.h b/src/apps/terminal/Shell.h index 75d6ad5836..f21064830b 100644 --- a/src/apps/terminal/Shell.h +++ b/src/apps/terminal/Shell.h @@ -32,9 +32,6 @@ 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 52a2864d87..c4cc918b67 100644 --- a/src/apps/terminal/TermView.cpp +++ b/src/apps/terminal/TermView.cpp @@ -1471,17 +1471,6 @@ 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; - fShell->GetAttr(tio); - if (*bytes == tio.c_cc[VINTR]) { - if (tio.c_lflag & ISIG) - fShell->Signal(SIGINT); - } -#endif - // Terminal filters RET, ENTER, F1...F12, and ARROW key code. // TODO: Cleanup if (numBytes == 1) {