#include <string.h>#include <sys/wait.h>#include <stdlib.h>#include <unistd.h>#include "RexxCore.h"#include "StringClass.hpp"#include "RexxActivity.hpp"#include "ActivityManager.hpp"#include "SystemInterpreter.hpp"#include "InterpreterInstance.hpp"#include "SysInterpreterInstance.hpp"#include "RexxInternalApis.h"#include <sys/types.h>#include <pwd.h>#include <limits.h>Go to the source code of this file.
Macros | |
| #define | CMDBUFSIZE 1024 /* Max size of executable cmd */ |
| #define | MAX_COMMAND_ARGS 400 |
| #define | CMDDEFNAME "/bin/bash" /* Bourne Again Shell is default */ |
| #define | UNKNOWN_COMMAND 127 /* unknown command return code */ |
| #define | SYSENV "command" /* Default cmd environment */ |
| #define | SHELL "SHELL" /* UNIX cmd handler env. var. name*/ |
| #define | EXPORT_FLAG 1 |
| #define | SET_FLAG 2 |
| #define | UNSET_FLAG 3 |
| #define | MAX_VALUE 1280 |
Functions | |
| bool | sys_process_export (RexxExitContext *context, const char *cmd, RexxObjectPtr &rc, int flag) |
| char * | unquote (const char *s) |
| bool | sys_process_cd (RexxExitContext *context, const char *cmd, RexxObjectPtr rc) |
| bool | scan_cmd (const char *parm_cmd, char **argPtr) |
| RexxObjectPtr RexxEntry | systemCommandHandler (RexxExitContext *context, RexxStringObject address, RexxStringObject command) |
Variables | |
| int | putflag |
| #define CMDBUFSIZE 1024 /* Max size of executable cmd */ |
Definition at line 73 of file unix/SystemCommands.cpp.
| #define CMDDEFNAME "/bin/bash" /* Bourne Again Shell is default */ |
Definition at line 81 of file unix/SystemCommands.cpp.
| #define EXPORT_FLAG 1 |
Definition at line 88 of file unix/SystemCommands.cpp.
| #define MAX_COMMAND_ARGS 400 |
Definition at line 74 of file unix/SystemCommands.cpp.
| #define MAX_VALUE 1280 |
Definition at line 91 of file unix/SystemCommands.cpp.
| #define SET_FLAG 2 |
Definition at line 89 of file unix/SystemCommands.cpp.
| #define SHELL "SHELL" /* UNIX cmd handler env. var. name*/ |
Definition at line 87 of file unix/SystemCommands.cpp.
| #define SYSENV "command" /* Default cmd environment */ |
Definition at line 86 of file unix/SystemCommands.cpp.
| #define UNKNOWN_COMMAND 127 /* unknown command return code */ |
Definition at line 84 of file unix/SystemCommands.cpp.
| #define UNSET_FLAG 3 |
Definition at line 90 of file unix/SystemCommands.cpp.
| bool scan_cmd | ( | const char * | parm_cmd, |
| char ** | argPtr | ||
| ) |
Definition at line 537 of file unix/SystemCommands.cpp.
References MAX_COMMAND_ARGS.
Referenced by systemCommandHandler().
| bool sys_process_cd | ( | RexxExitContext * | context, |
| const char * | cmd, | ||
| RexxObjectPtr | rc | ||
| ) |
Definition at line 400 of file unix/SystemCommands.cpp.
References unquote().
Referenced by systemCommandHandler().
| bool sys_process_export | ( | RexxExitContext * | context, |
| const char * | cmd, | ||
| RexxObjectPtr & | rc, | ||
| int | flag | ||
| ) |
Definition at line 107 of file unix/SystemCommands.cpp.
References EXPORT_FLAG, getEnvironment(), MAX_VALUE, putflag, SET_FLAG, and UNSET_FLAG.
Referenced by systemCommandHandler().
| RexxObjectPtr RexxEntry systemCommandHandler | ( | RexxExitContext * | context, |
| RexxStringObject | address, | ||
| RexxStringObject | command | ||
| ) |
Definition at line 600 of file unix/SystemCommands.cpp.
References EXPORT_FLAG, MAX_COMMAND_ARGS, NULLOBJECT, scan_cmd(), SET_FLAG, Utilities::strCaselessCompare(), sys_process_cd(), sys_process_export(), SYSINITIALADDRESS, UNKNOWN_COMMAND, and UNSET_FLAG.
Referenced by SysInterpreterInstance::registerCommandHandlers().
| char* unquote | ( | const char * | s | ) |
Definition at line 361 of file unix/SystemCommands.cpp.
Referenced by sys_process_cd().
|
extern |
Definition at line 116 of file unix/ExternalFunctions.cpp.
Referenced by SystemInterpreter::restoreEnvironment(), and sys_process_export().