Download CGS User Manual

Transcript
Dok.Nr./Doc. No.: CGS–RIBRE–SUM–0001
Ausgabe/Issue:
Überarbtg./Rev.:
Seite/Page:
I-15
13
–
I–101
Datum/Date:
Datum/Date:
von /of:
28.02.2013
–
I–124
UCL Ground System library Specification: SYSTEM
The library SYSTEM contains some Operation System specific operations.
library Id (Body_Id): 17
I-15.1
UCL System library Specification
–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
––
–– ***************************
–– System UCL System Library
–– ***************************
––
–– ABSTRACT
––
Defines operations for OS command execution.
––
––
Must be compiled for ground and with Body Id = 17
––
––
recommended Nickname: ”SYSTEM”
––
–– IDENTIFICATION
––
PROJECT NAME : CGS
––
OBJECT NAME : System System–Library
––
CGS CM
: ”$Id: //cgs/MAIN/src/distribution/gsaf/cgsi/lib/ucl/system_.ucl#5 $”
––*–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
–– CONTENTS
––
COMPILER
: UCLC
––
LANGUAGE
: UCL
–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
library SYSTEM;
–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
–– IMPORTS
–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
import GROUND_COMMON;
–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
–– OPERATIONS
–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
–––––––––––––––––––––––
–– Command execution ––
–––––––––––––––––––––––
1:
guarded procedure EXECUTE
(in COMMAND
: STRING;
in PARAMETER
: STRING := ””;
in NODE
: NODE_NAME := \\;
out PID
: UNSIGNED_INTEGER;
out STATUS
: UCL_RETURN);
–– Description:
––
This operation creates a new process and executes COMMAND
––
using ’/bin/sh’ together with the specified parameter on the specified
––
node. The created process will run completely independent.
––
It is up to the user to redirect input and output if necessary.
––
The started process is running with the user_id und group_id
––
of the user of the running PCS process (i.e. cgsadmin).
–– Parameters:
––
IN:
––
COMMAND
: command to be exceute
––
PARAMETER : parameter list
––
NODE
: Node on which the command is to be executed, by default
––
the current node.
––
OUT:
––
PID
: OS process identifier of the created process.
––
STATUS
: UCL return status
––
OK
––
NOT_OK
2:
guarded procedure EXECUTE_AND_WAIT
(in COMMAND
: STRING;
in PARAMETER
: STRING := ””;
in NODE
: NODE_NAME := \\;
in TIMEOUT
: DURATION;
out PID
: UNSIGNED_INTEGER;
out UNIX_RETURN : INTEGER;
out STATUS
: UCL_RETURN);
–– Description:
Copyright per DIN 34