summaryrefslogtreecommitdiff
path: root/run-command.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2009-01-28 07:38:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-01-28 22:09:37 (GMT)
commitd8e96fd86d415554a9c2e09ffb929a9e22fdad25 (patch)
treecb7589adf8995be729e71c79000b4ea7797efb9e /run-command.c
parent1d64f21d9949ac1dd59fa722160e46181d92854d (diff)
downloadgit-d8e96fd86d415554a9c2e09ffb929a9e22fdad25.zip
git-d8e96fd86d415554a9c2e09ffb929a9e22fdad25.tar.gz
git-d8e96fd86d415554a9c2e09ffb929a9e22fdad25.tar.bz2
git: use run_command() to execute dashed externals
We used to simply try calling execvp(); if it succeeded, then we were done and the new program was running. If it didn't, then we knew that it wasn't a valid command. Unfortunately, this interacted badly with the new pager handling. Now that git remains the parent process and the pager is spawned, git has to hang around until the pager is finished. We install an atexit handler to do this, but that handler never gets called if we successfully run execvp. You could see this behavior by running any dashed external using a pager (e.g., "git -p stash list"). The command finishes running, but the pager is still going. In the case of less, it then gets an error reading from the terminal and exits, potentially leaving the terminal in a broken state (and not showing the output). This patch just uses run_command() to try running the dashed external. The parent git process then waits for the external process to complete and then handles the pager cleanup as it would for an internal command. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'run-command.c')
0 files changed, 0 insertions, 0 deletions