bash 源码 分析


#2013_10_05   星期六   add by greshem

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

 554   run_shopt_alist ();
 558   shell_initialize ();
 560   set_default_lang ();
 561   set_default_locale_vars ();
 724       reset_mail_timer ();
 725       init_mail_dates ();
 726
 729       bash_initialize_history ();
 734         load_history ();
 736
 739       get_tty_state ();
 743  read_and_execute:
 745
 749  reader_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);




你可能感兴趣的:(bash 源码 分析)