From d8b3041e85ed299fb3670c79ae26a9861dabd71f Mon Sep 17 00:00:00 2001 From: zawz Date: Tue, 29 Jun 2021 14:07:24 +0200 Subject: [PATCH] fix broken interactive tty on live-exec --- README.md | 2 -- src/exec.cpp | 3 --- 2 files changed, 5 deletions(-) diff --git a/README.md b/README.md index 822a3a0..610540d 100644 --- a/README.md +++ b/README.md @@ -157,8 +157,6 @@ Directly execute an extended lxsh script with either > Direct execution introduces direct dependency on lxsh and code parsing overhead, > therefore it should be avoided in production environments. -> stdin is known to not work properly on direct execution as of now - ### Variable/Function/command listing You can list all calls of variables, functions or commands with `--list-*` options diff --git a/src/exec.cpp b/src/exec.cpp index fe89834..4c9717a 100644 --- a/src/exec.cpp +++ b/src/exec.cpp @@ -194,15 +194,12 @@ void parse_exec(FILE* fd, parse_context ctx) pid_t forkexec(const char* bin, char *const args[]) { pid_t child_pid; - // int tfd = dup(STDIN_FILENO); - // std::cout << tfd << std::endl; if((child_pid = vfork()) == -1) { throw std::runtime_error("fork() failed"); } if (child_pid == 0) // child process { - setpgid(child_pid, child_pid); //Needed so negative PIDs can kill children of /bin/sh execv(bin, args); throw std::runtime_error("execv() failed"); }