From e8320f350f523c3219ff8ec639663193941af57d Mon Sep 17 00:00:00 2001 From: Jeff King Date: Tue, 5 Jun 2012 04:56:04 -0400 Subject: pager: drop "wait for output to run less" hack Commit 35ce862 (pager: Work around window resizing bug in 'less', 2007-01-24) causes git's pager sub-process to wait to receive input after forking but before exec-ing the pager. To handle this, run-command had to grow a "pre-exec callback" feature. Unfortunately, this feature does not work at all on Windows (where we do not fork), and interacts poorly with run-command's parent notification system. Its use should be discouraged. The bug in less was fixed in version 406, which was released in June 2007. It is probably safe at this point to remove our workaround. That lets us rip out the preexec_cb feature entirely. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- run-command.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'run-command.c') diff --git a/run-command.c b/run-command.c index 606791dc67..dff28a7fcc 100644 --- a/run-command.c +++ b/run-command.c @@ -394,16 +394,6 @@ fail_pipe: unsetenv(*cmd->env); } } - if (cmd->preexec_cb) { - /* - * We cannot predict what the pre-exec callback does. - * Forgo parent notification. - */ - close(child_notifier); - child_notifier = -1; - - cmd->preexec_cb(); - } if (cmd->git_cmd) { execv_git_cmd(cmd->argv); } else if (cmd->use_shell) { -- cgit v1.2.1