bash|bash 源码 分析


#2013_10_05星期六add by greshem

350 main (argc, argv, env)
507cmd_init();
525init_interactive ();

554run_shopt_alist ();
558shell_initialize ();
560set_default_lang ();
561set_default_locale_vars ();
724reset_mail_timer ();
725init_mail_dates ();
726
729bash_initialize_history ();
734load_history ();
736
739get_tty_state ();
743read_and_execute:
745
749reader_loop ();
read_command () == 0)
dispose_command (current_command);
execute_command (current_command);
execute_command_internal (command, 0, NO_PIPE, NO_PIPE, bitmap);
execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close));

do_redirections (command->redirects, RX_ACTIVE|RX_UNDOABLE) != 0)
dispose_redirects (redirection_undo_list);

execute_for_command (command->value.For);
execute_arith_for_command (command->value.ArithFor);
execute_select_command (command->value.Select);
execute_case_command (command->value.Case);
execute_while_command (command->value.While);
execute_until_command (command->value.While);
execute_if_command (command->value.If);
execute_command_internal (command->value.Group->command,
execute_connection (command, asynchronous,
execute_cond_command (command->value.Cond);




    推荐阅读