File shell_command.c


Included Files


Preprocessor definitions

#define ARGS_MAX 32

#define CMD_MAX 256

#define HOME_LEN 256


Global Function shell_command_add_environment()

void shell_command_add_environment ( ShellCommand* command, const char* attr, const char* value )
Prototyped in: shell_command.h
Calls: environment_array_add() environment.c
Called by: setup_handler_set_attr() setup.c

Global Function shell_command_array_find()

ShellCommand* shell_command_array_find ( Array* array, const char* name )
Prototyped in: shell_command.h
Calls: array_get() array.c
  strcmp()
Called by: interpreter_process_line() interpreter.c

Global Function shell_command_create()

ShellCommand* shell_command_create ( void )
Prototyped in: shell_command.h
Calls: array_create() array.c
  log_error() log.c
  shell_command_set_defaults() shell_command.c
  free(), malloc()
Called by: setup_handler_begin_block() setup.c

Global Function shell_command_destroy()

void shell_command_destroy ( void* data )
Prototyped in: shell_command.h
Calls: array_destroy() array.c
  free()
Used in: setup_reinitialize() setup.c
References Functions: environment_destroy() environment.c

Global Function shell_command_execute()

int shell_command_execute ( ShellCommand* command )
Prototyped in: shell_command.h
Calls: environment_array_assign() environment.c
  sys_util_findHomeDir() sys_util.c
  atexit(), chdir(), dup2(), exit(), fileno(), getuid(), open(), pth_fork(), setenv(), setgid(), setuid(), system()
Called by: interpreter_process_line() interpreter.c

Global Function shell_command_set_attribute()

void shell_command_set_attribute ( ShellCommand* command, const char* attr, const char* value )
Prototyped in: shell_command.h
Calls: string_util_strncpy() string_util.c
  sys_util_findGID() sys_util.c
  sys_util_findUID() sys_util.c
  strcmp()
Called by: setup_handler_set_attr() setup.c

Global Function shell_command_set_defaults()

void shell_command_set_defaults ( ShellCommand* command )
Prototyped in: shell_command.h
Called by: shell_command_create() shell_command.c