|
Minishell 1.0
42 School Minishell Project - A simple shell implementation
|
Komut çalıştırma fonksiyonları Ayrıntılar...
#include "../../include/minishell.h"#include <stdio.h>#include <stdlib.h>#include <sys/wait.h>#include <unistd.h>Bu dosyanın kaynak koduna git.
Fonksiyonlar | |
| static void | update_underscore (t_shell *shell, t_cmd *cmd) |
| _ underscore değişkenini son argümanla günceller | |
| int | run_builtin_parent (t_shell *shell, t_cmd *cmd) |
| Builtin'i parent process'te çalıştır (fork yok). | |
| static void | child_exec (t_shell *shell, t_cmd *cmd, char *path) |
| Bulunan path ile child process'te execve çalıştır. | |
| int | execute_external (t_shell *shell, t_cmd *cmd) |
| Harici komutu çalıştır — path kontrolü fork öncesi yapılır böylece "command not found" hatası parent'ta sırayla basılır. | |
| int | execute_cmd (t_shell *shell, t_cmd *cmd) |
| Ana komut çalıştırma dispatcher. | |
Komut çalıştırma fonksiyonları
executor_cmd.c dosyasında tanımlanmıştır.
_ underscore değişkenini son argümanla günceller
executor_cmd.c dosyasının 27 numaralı satırında tanımlanmıştır.
Referanslar s_cmd::args, s_shell::env_list ve update_env_value().
Referans veren execute_cmd().
Builtin'i parent process'te çalıştır (fork yok).
executor_cmd.c dosyasının 42 numaralı satırında tanımlanmıştır.
Referanslar execute_builtin(), restore_std_fds(), save_std_fds() ve setup_redirs().
Referans veren execute_cmd().
Bulunan path ile child process'te execve çalıştır.
executor_cmd.c dosyasının 62 numaralı satırında tanımlanmıştır.
Referanslar s_cmd::args, create_envp(), free_str_array(), reset_signals(), setup_redirs() ve shell_exit().
Referans veren execute_external().
Harici komutu çalıştır — path kontrolü fork öncesi yapılır böylece "command not found" hatası parent'ta sırayla basılır.
executor_cmd.c dosyasının 86 numaralı satırında tanımlanmıştır.
Referanslar s_cmd::args, child_exec(), s_shell::env_list, find_cmd_path(), is_executable(), shell_error(), update_env_value() ve wait_for_child().
Referans veren execute_cmd().
Ana komut çalıştırma dispatcher.
executor_cmd.c dosyasının 121 numaralı satırında tanımlanmıştır.
Referanslar s_cmd::args, s_shell::env_list, execute_external(), is_builtin(), s_cmd::redirections, restore_std_fds(), run_builtin_parent(), save_std_fds(), setup_redirs(), update_env_value() ve update_underscore().
Referans veren execute_ast().