Newer
Older
/*
** execution.h for 42sh
**
** Made by Seblu
** Login <seblu@epita.fr>
**
** Started on Sun Mar 30 16:02:07 2006 Seblu
*/
#ifndef EXEC_H_
# define EXEC_H_
# include <assert.h>
# include "../ast/ast.h"
/*!
** Exec an ast node. Call an exec function according node type
**
** @param node node to execute.
*/
/*!
** Execute a command.
**
** @param cmd command to execute
*/
/*!
** Execute a command in a pipeline. This call preserve for too
** many system call fork Take care, this must be called after a fork
**
** @param cmd command to execute
*/
void exec_piped_cmd(s_cmd_node *cmd);
void exec_case(s_case_node *node);
void exec_for(s_for_node *node);
void exec_and(s_bin_node *node);
void exec_or(s_bin_node *node);
void exec_bang(s_bin_node *node);
void exec_if(s_if_node *node);
void exec_pipe(s_bin_node *node);
void exec_red(s_red_node *node);
/*!
** Execute a task list
**
** @param node task list
*/
/*!
** Execute a task in background
**
** @param node backgroudn task node
*/
/*!
** Execute a function declaration.
** Register this function.
**
** @param node function to register
*/
/*!
** Execute a subshell
**
** @param node node to treat
*/
void exec_subshell(s_bin_node *node);