summaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
authorEnrico Zandomeni Borba <enricozb@gmail.com>2024-12-23 09:25:38 +0100
committerEnrico Zandomeni Borba <enricozb@gmail.com>2024-12-23 09:25:38 +0100
commitdb18d02627fe9ff0f50bd558a2a6d396fb4b2649 (patch)
tree7d225a47e7cf0ee09f16d5a213eab4d6d3afbd14 /src/main.cc
parent52125e6336d596aebdd4da91080b3178ddca7449 (diff)
cleanup merge
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/main.cc b/src/main.cc
index f0c6aad1..db289aeb 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -689,16 +689,6 @@ pid_t fork_server_to_background()
std::unique_ptr<UserInterface> create_local_ui(UIType ui_type)
{
- if (ui_type == UIType::Terminal and not isatty(0))
- {
- // move stdin to another fd, and restore tty as stdin
- int fd = dup(0);
- int tty = open("/dev/tty", O_RDONLY);
- dup2(tty, 0);
- close(tty);
- create_fifo_buffer("*stdin*", fd, Buffer::Flags::None, AutoScroll::NotInitially);
- }
-
auto ui = make_ui(ui_type);
static SignalHandler old_handler = set_signal_handler(SIGTSTP, [](int sig) {
@@ -885,7 +875,6 @@ int run_server(StringView session, StringView server_init,
int exit_status = 0;
try
{
-
if (ui_type == UIType::Terminal and not isatty(0))
{
// move stdin to another fd, and restore tty as stdin