summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-10-25 10:41:15 (GMT)
committerJeff King <peff@peff.net>2012-10-25 10:41:15 (GMT)
commit55ff63007509d075d32861ff48cc8bb57d445b2a (patch)
tree4322ea2d5cd79df612511a3606cc38698ca64480
parent8c7a786b6c8eae8eac91083cdc9a6e337bc133b0 (diff)
parente8320f350f523c3219ff8ec639663193941af57d (diff)
downloadgit-55ff63007509d075d32861ff48cc8bb57d445b2a.zip
git-55ff63007509d075d32861ff48cc8bb57d445b2a.tar.gz
git-55ff63007509d075d32861ff48cc8bb57d445b2a.tar.bz2
Merge branch 'jk/no-more-pre-exec-callback'
Removes a workaround for buggy version of less older than version 406. * jk/no-more-pre-exec-callback: pager: drop "wait for output to run less" hack
-rw-r--r--pager.c18
-rw-r--r--run-command.c10
-rw-r--r--run-command.h1
3 files changed, 0 insertions, 29 deletions
diff --git a/pager.c b/pager.c
index 4dcb08d..c0b4387 100644
--- a/pager.c
+++ b/pager.c
@@ -11,21 +11,6 @@
* something different on Windows.
*/
-#ifndef WIN32
-static void pager_preexec(void)
-{
- /*
- * Work around bug in "less" by not starting it until we
- * have real input
- */
- fd_set in;
-
- FD_ZERO(&in);
- FD_SET(0, &in);
- select(1, &in, NULL, &in, NULL);
-}
-#endif
-
static const char *pager_argv[] = { NULL, NULL };
static struct child_process pager_process;
@@ -93,9 +78,6 @@ void setup_pager(void)
static const char *env[] = { "LESS=FRSX", NULL };
pager_process.env = env;
}
-#ifndef WIN32
- pager_process.preexec_cb = pager_preexec;
-#endif
if (start_command(&pager_process))
return;
diff --git a/run-command.c b/run-command.c
index 1101ef7..3b982e4 100644
--- a/run-command.c
+++ b/run-command.c
@@ -397,16 +397,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) {
diff --git a/run-command.h b/run-command.h
index 44f7d2b..850c638 100644
--- a/run-command.h
+++ b/run-command.h
@@ -39,7 +39,6 @@ struct child_process {
unsigned stdout_to_stderr:1;
unsigned use_shell:1;
unsigned clean_on_exit:1;
- void (*preexec_cb)(void);
};
int start_command(struct child_process *);