Improve fork reporting

Save a couple of forks during init
This commit is contained in:
ridiculousfish 2012-04-24 10:10:43 -07:00
parent 675106cfa5
commit fb2ed355ec
2 changed files with 10 additions and 5 deletions

View file

@ -561,7 +561,7 @@ void exec( parser_t &parser, job_t *j )
*/
int exec_error=0;
int needs_keepalive = 0;
bool needs_keepalive = false;
process_t keepalive;
@ -672,12 +672,12 @@ void exec( parser_t &parser, job_t *j )
{
if( p->next )
{
needs_keepalive = 1;
needs_keepalive = true;
break;
}
if( p != j->first_process )
{
needs_keepalive = 1;
needs_keepalive = true;
break;
}
@ -1216,7 +1216,7 @@ void exec( parser_t &parser, job_t *j )
fflush(stdout);
fflush(stderr);
if (g_log_forks) {
printf("Executing fork for internal builtin for '%ls' (io is %p, job_io is %p)\n", p->argv0(), io, j->io);
printf("fork #%d: Executing fork for internal builtin for '%ls' (io is %p, job_io is %p)\n", g_fork_count, p->argv0(), io, j->io);
io_print(io);
}
pid = execute_fork(false);

View file

@ -207,7 +207,12 @@ function __fish_config_interactive -d "Initializations that should be performed
# Reload keybindings when binding variable change
function __fish_reload_key_bindings -d "Reload keybindings when binding variable change" --on-variable fish_key_bindings
eval $fish_key_bindings ^/dev/null
# Do something nasty to avoid two forks
if test "$fish_key_bindings" = fish_default_key_bindings
fish_default_key_bindings
else
eval $fish_key_bindings ^/dev/null
end
end
# Load keybindings