From 1222be7e3a61d4261a168ed5afb16e2548416f8f Mon Sep 17 00:00:00 2001 From: AnotherTest Date: Sun, 9 Aug 2020 13:47:09 +0430 Subject: [PATCH] HackStudio: Set the pgrp of the pseudoterminal to the child pid This fixes #3046. --- DevTools/HackStudio/TerminalWrapper.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DevTools/HackStudio/TerminalWrapper.cpp b/DevTools/HackStudio/TerminalWrapper.cpp index aad9241fc3..58444aa7ac 100644 --- a/DevTools/HackStudio/TerminalWrapper.cpp +++ b/DevTools/HackStudio/TerminalWrapper.cpp @@ -104,6 +104,8 @@ void TerminalWrapper::run_command(const String& command) exit(1); } + tcsetpgrp(pts_fd, getpid()); + // NOTE: It's okay if this fails. (void)ioctl(0, TIOCNOTTY);