rxunixsys.cpp File Reference
#include "rxunixsys.h"
Include dependency graph for rxunixsys.cpp:

Go to the source code of this file.

Functions

 RexxRoutine2 (int, SysSignal, int, signum, CSTRING, sigact)
 
 RexxRoutine1 (RexxObjectPtr, SysUname, OPTIONAL_CSTRING, ichar)
 
 RexxRoutine0 (RexxObjectPtr, SysSetsid)
 
 RexxRoutine1 (RexxObjectPtr, SysGetsid, int, pid)
 
 RexxRoutine1 (RexxObjectPtr, SysSetuid, int, uid)
 
 RexxRoutine0 (RexxObjectPtr, SysGetuid)
 
 RexxRoutine1 (RexxObjectPtr, SysSeteuid, int, uid)
 
 RexxRoutine0 (RexxObjectPtr, SysGeteuid)
 
 RexxRoutine1 (RexxObjectPtr, SysSetgid, int, gid)
 
 RexxRoutine0 (RexxObjectPtr, SysGetgid)
 
 RexxRoutine1 (RexxObjectPtr, SysSetegid, int, gid)
 
 RexxRoutine0 (RexxObjectPtr, SysGetegid)
 
 RexxRoutine0 (RexxObjectPtr, SysSetpgrp)
 
 RexxRoutine0 (RexxObjectPtr, SysGetpgrp)
 
 RexxRoutine2 (RexxObjectPtr, SysSetpgid, int, pid1, int, pid2)
 
 RexxRoutine1 (RexxObjectPtr, SysGetpgid, int, pid)
 
 RexxRoutine0 (RexxObjectPtr, SysGetpid)
 
 RexxRoutine0 (RexxObjectPtr, SysGetppid)
 
 RexxRoutine0 (RexxObjectPtr, SysGettid)
 
 RexxRoutine2 (int, SysKill, int, pid1, int, sig1)
 
 RexxRoutine2 (int, SysSymlink, CSTRING, path1, CSTRING, path2)
 
 RexxRoutine2 (int, SysLink, CSTRING, path1, CSTRING, path2)
 
 RexxRoutine1 (int, SysUnlink, CSTRING, path1)
 
 RexxRoutine3 (int, SysChown, CSTRING, path1, int, uid, int, gid)
 
 RexxRoutine3 (int, SysLchown, CSTRING, path1, int, uid, int, gid)
 
 RexxRoutine1 (int, SysChroot, CSTRING, path1)
 
 RexxRoutine1 (int, SysUmask, int, nmask)
 
 RexxRoutine1 (int, SysClose, int, fh)
 
 RexxRoutine2 (RexxObjectPtr, SysGetpwnam, CSTRING, user, CSTRING, ichar)
 
 RexxRoutine2 (RexxObjectPtr, SysGetpwuid, int, uid, CSTRING, ichar)
 
 RexxRoutine2 (RexxObjectPtr, SysGetgrnam, CSTRING, grpname, CSTRING, ichar)
 
 RexxRoutine2 (RexxObjectPtr, SysGetgrgid, int, gid, CSTRING, ichar)
 
 RexxRoutine2 (RexxObjectPtr, SysStat, CSTRING, fname, CSTRING, ichar)
 
 RexxRoutine2 (int, SysAccess, CSTRING, file, int, option)
 
 RexxRoutine3 (RexxObjectPtr, SysGetservbyname, CSTRING, name, CSTRING, proto, CSTRING, ichar)
 
 RexxRoutine3 (RexxObjectPtr, SysGetservbyport, int, port, CSTRING, proto, CSTRING, ichar)
 
 RexxRoutine1 (RexxObjectPtr, SysWordexp, CSTRING, inexp)
 
 RexxRoutine0 (int, SysGetsizeofptr)
 
 RexxRoutine0 (RexxObjectPtr, SysGethostname)
 
 RexxRoutine2 (int, SysChmod, CSTRING, file, CSTRING, mode)
 
 RexxRoutine0 (int, SysGeterrno)
 
 RexxRoutine1 (RexxObjectPtr, SysGeterrnomsg, int, en)
 
 RexxRoutine2 (RexxObjectPtr, SysCrypt, CSTRING, str, CSTRING, salt)
 
 RexxRoutine2 (int, SysMkdir, CSTRING, dir, int, mode)
 
 RexxRoutine1 (int, SysRmdir, CSTRING, dir)
 
 RexxRoutine1 (RexxObjectPtr, SysGetdirlist, CSTRING, dir)
 
 RexxRoutine0 (RexxObjectPtr, SysGettzname1)
 
 RexxRoutine0 (RexxObjectPtr, SysGettzname2)
 
static void orxnixclib_loader (RexxThreadContext *context)
 
 OOREXX_GET_PACKAGE (orxnixclib)
 

Variables

RexxRoutineEntry orxnixclib_routines []
 
RexxMethodEntry orxnixclib_methods []
 
RexxPackageEntry orxnixclib_package_entry
 

Function Documentation

◆ OOREXX_GET_PACKAGE()

OOREXX_GET_PACKAGE ( orxnixclib  )

◆ orxnixclib_loader()

static void orxnixclib_loader ( RexxThreadContext context)
static

Definition at line 1645 of file rxunixsys.cpp.

◆ RexxRoutine0() [1/15]

RexxRoutine0 ( int  ,
SysGeterrno   
)

Method: SysGeterrno

Get the errno value.

Returns
errno.

Definition at line 1342 of file rxunixsys.cpp.

◆ RexxRoutine0() [2/15]

RexxRoutine0 ( int  ,
SysGetsizeofptr   
)

Method: SysGetsizeofptr

Get the size of the ooRexx application pointers (in bits).

Returns
32 or 64.

Definition at line 1171 of file rxunixsys.cpp.

◆ RexxRoutine0() [3/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysGetegid   
)

Method: SysGetegid

Get the effective groupid.

Returns
0 or -1

Definition at line 271 of file rxunixsys.cpp.

◆ RexxRoutine0() [4/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysGeteuid   
)

Method: SysGeteuid

Get the effective userid.

Returns
uid

Definition at line 206 of file rxunixsys.cpp.

◆ RexxRoutine0() [5/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysGetgid   
)

Method: SysGetgid

Get the groupid.

Returns
0 or -1

Definition at line 239 of file rxunixsys.cpp.

◆ RexxRoutine0() [6/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysGethostname   
)

Method: SysGethostname

Get the machine hostname.

Returns
hostname.

Definition at line 1187 of file rxunixsys.cpp.

◆ RexxRoutine0() [7/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysGetpgrp   
)

Method: SysGetpgrp

Get the pgrp.

Returns
0 or -1

Definition at line 304 of file rxunixsys.cpp.

◆ RexxRoutine0() [8/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysGetpid   
)

Method: SysGetpid

Get the pid.

Returns
pid

Definition at line 358 of file rxunixsys.cpp.

◆ RexxRoutine0() [9/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysGetppid   
)

Method: SysGetppid

Get the ppid.

Returns
pid

Definition at line 373 of file rxunixsys.cpp.

◆ RexxRoutine0() [10/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysGettid   
)

Method: SysGettid

Get the tid.

Returns
tid

Definition at line 388 of file rxunixsys.cpp.

◆ RexxRoutine0() [11/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysGettzname1   
)

Method: SysGettzname1

Return the timezone name.

Returns
RexxStringObject.

Definition at line 1619 of file rxunixsys.cpp.

◆ RexxRoutine0() [12/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysGettzname2   
)

Method: SysGettzname2

Return the altername timezone name.

Returns
RexxStringObject.

Definition at line 1635 of file rxunixsys.cpp.

◆ RexxRoutine0() [13/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysGetuid   
)

Method: SysGetuid

Get the userid.

Returns
uid

Definition at line 173 of file rxunixsys.cpp.

◆ RexxRoutine0() [14/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysSetpgrp   
)

Method: SysSetpgrp

Set the pgrp.

Returns
0 or -1

Definition at line 286 of file rxunixsys.cpp.

◆ RexxRoutine0() [15/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysSetsid   
)

Method: SysSetsid

Set the Session id.

Returns
Process id

Definition at line 120 of file rxunixsys.cpp.

◆ RexxRoutine1() [1/15]

RexxRoutine1 ( int  ,
SysChroot  ,
CSTRING  ,
path1   
)

Method: SysChroot

Changes the root directory of the calling process.

Parameters
path1The new root path.
Returns
int error code

Definition at line 528 of file rxunixsys.cpp.

◆ RexxRoutine1() [2/15]

RexxRoutine1 ( int  ,
SysClose  ,
int  ,
fh   
)

Method: SysClose

Close a file handle.

Parameters
nmaskThe file handle to close.
Returns
the return code from the C close function

Definition at line 565 of file rxunixsys.cpp.

◆ RexxRoutine1() [3/15]

RexxRoutine1 ( int  ,
SysRmdir  ,
CSTRING  ,
dir   
)

Method: SysRmdir

Remove a subdirectory.

Parameters
dirThe subdirectory to remove.
Returns
0 or -1.

Definition at line 1574 of file rxunixsys.cpp.

◆ RexxRoutine1() [4/15]

RexxRoutine1 ( int  ,
SysUmask  ,
int  ,
nmask   
)

Method: SysUmask

Sets the calling process umask.

Parameters
nmaskThe new umask.
Returns
the old umansk value

Definition at line 548 of file rxunixsys.cpp.

◆ RexxRoutine1() [5/15]

RexxRoutine1 ( int  ,
SysUnlink  ,
CSTRING  ,
path1   
)

Method: SysUnlink

Remove a hard or soft link.

Parameters
path1The source path.
Returns
int error code

Definition at line 465 of file rxunixsys.cpp.

◆ RexxRoutine1() [6/15]

RexxRoutine1 ( RexxObjectPtr  ,
SysGetdirlist  ,
CSTRING  ,
dir   
)

Method: SysGetdirlist

Return the list of files in a subdirectory.

Parameters
dirThe subdirectory to use.
Returns
RexxArrayObject.

Definition at line 1591 of file rxunixsys.cpp.

◆ RexxRoutine1() [7/15]

RexxRoutine1 ( RexxObjectPtr  ,
SysGeterrnomsg  ,
int  ,
en   
)

Method: SysGeterrnomsg

Get the string definition of an error number.

Returns
string.

Definition at line 1357 of file rxunixsys.cpp.

◆ RexxRoutine1() [8/15]

RexxRoutine1 ( RexxObjectPtr  ,
SysGetpgid  ,
int  ,
pid   
)

Method: SysGetpgid

Get the pgid.

Parameters
pid1The pid to query.
Returns
The pid.

Definition at line 342 of file rxunixsys.cpp.

◆ RexxRoutine1() [9/15]

RexxRoutine1 ( RexxObjectPtr  ,
SysGetsid  ,
int  ,
pid   
)

Method: SysGetsid

Get the Session id.

Parameters
pidThe pid.
Returns
Session id

Definition at line 139 of file rxunixsys.cpp.

◆ RexxRoutine1() [10/15]

RexxRoutine1 ( RexxObjectPtr  ,
SysSetegid  ,
int  ,
gid   
)

Method: SysSetegid

Set the effective groupid.

Parameters
gidThe groupid.
Returns
0 or -1

Definition at line 256 of file rxunixsys.cpp.

◆ RexxRoutine1() [11/15]

RexxRoutine1 ( RexxObjectPtr  ,
SysSeteuid  ,
int  ,
uid   
)

Method: SysSeteuid

Set the effective userid.

Parameters
uidThe userid.
Returns
0 or -1

Definition at line 190 of file rxunixsys.cpp.

◆ RexxRoutine1() [12/15]

RexxRoutine1 ( RexxObjectPtr  ,
SysSetgid  ,
int  ,
gid   
)

Method: SysSetgid

Set the groupid.

Parameters
gidThe groupid.
Returns
0 or -1

Definition at line 223 of file rxunixsys.cpp.

◆ RexxRoutine1() [13/15]

RexxRoutine1 ( RexxObjectPtr  ,
SysSetuid  ,
int  ,
uid   
)

Method: SysSetuid

Set the userid.

Parameters
uidThe userid.
Returns
0 or -1

Definition at line 157 of file rxunixsys.cpp.

◆ RexxRoutine1() [14/15]

RexxRoutine1 ( RexxObjectPtr  ,
SysUname  ,
OPTIONAL_CSTRING  ,
ichar   
)

Method: SysUname

Return the uname information.

Parameters
icharThe option string.
Returns
Option information

Definition at line 86 of file rxunixsys.cpp.

◆ RexxRoutine1() [15/15]

RexxRoutine1 ( RexxObjectPtr  ,
SysWordexp  ,
CSTRING  ,
inexp   
)

Method: SysWordexp

Return an array of files matching the input expression.

Parameters
inexpThe input expression.
Returns
Array of file names.

Definition at line 1028 of file rxunixsys.cpp.

◆ RexxRoutine2() [1/14]

RexxRoutine2 ( int  ,
SysAccess  ,
CSTRING  ,
file  ,
int  ,
option   
)

Method: SysAccess

Return access information.

Parameters
fileThe file specification.
icharThe integer option.
Returns
0 = access allowed.

Definition at line 892 of file rxunixsys.cpp.

◆ RexxRoutine2() [2/14]

RexxRoutine2 ( int  ,
SysChmod  ,
CSTRING  ,
file  ,
CSTRING  ,
mode   
)

Method: SysChmod

Change the file permissions.

Parameters
usrThe user permissions.
grpThe group permissions.
othThe other permissions.
Returns
Return code from chmod().

Definition at line 1210 of file rxunixsys.cpp.

◆ RexxRoutine2() [3/14]

RexxRoutine2 ( int  ,
SysKill  ,
int  ,
pid1  ,
int  ,
sig1   
)

Method: SysKill

Kill a process.

Parameters
pid1The pid to kill.
sig1The signal to send.
Returns
return code

Definition at line 407 of file rxunixsys.cpp.

◆ RexxRoutine2() [4/14]

RexxRoutine2 ( int  ,
SysLink  ,
CSTRING  ,
path1  ,
CSTRING  ,
path2   
)

Method: SysLink

Create a hard link.

Parameters
path1The source path.
path2The target path.
Returns
int error code

Definition at line 447 of file rxunixsys.cpp.

◆ RexxRoutine2() [5/14]

RexxRoutine2 ( int  ,
SysMkdir  ,
CSTRING  ,
dir  ,
int  ,
mode   
)

Method: SysMkdir

Create a subdirectory.

Parameters
dirThe subdirectory to create.
modeThe mode for the new subdirectory.
Returns
0 or -1.

Definition at line 1556 of file rxunixsys.cpp.

◆ RexxRoutine2() [6/14]

RexxRoutine2 ( int  ,
SysSignal  ,
int  ,
signum  ,
CSTRING  ,
sigact   
)

Function: SysSignal

Change a signal behavior.

Parameters
signumThe signal number.
sigactThe new signal action.
Returns
Function return code

Definition at line 53 of file rxunixsys.cpp.

◆ RexxRoutine2() [7/14]

RexxRoutine2 ( int  ,
SysSymlink  ,
CSTRING  ,
path1  ,
CSTRING  ,
path2   
)

Method: SysSymlink

Create a symbolic link.

Parameters
path1The source path.
path2The target path.
Returns
int error code

Definition at line 427 of file rxunixsys.cpp.

◆ RexxRoutine2() [8/14]

RexxRoutine2 ( RexxObjectPtr  ,
SysCrypt  ,
CSTRING  ,
str  ,
CSTRING  ,
salt   
)

Method: SysCrypt

Encrypt a string.

Parameters
strThe string to encrypt.
saltThe salt: two characters for the default DES encryption, other salt lengths may be available depending on the Unix platform for other encryption algorithms (MD5, Blowfish, SHA-256, SHA-512)
Returns
Encrypted string.

Definition at line 1517 of file rxunixsys.cpp.

References Rexx_Error_Incorrect_call_null.

◆ RexxRoutine2() [9/14]

RexxRoutine2 ( RexxObjectPtr  ,
SysGetgrgid  ,
int  ,
gid  ,
CSTRING  ,
ichar   
)

Method: SysGetgrgid

Return group name information from the group file.

Parameters
userThe gid.
icharThe option string.
Returns
Option information

Definition at line 728 of file rxunixsys.cpp.

◆ RexxRoutine2() [10/14]

RexxRoutine2 ( RexxObjectPtr  ,
SysGetgrnam  ,
CSTRING  ,
grpname  ,
CSTRING  ,
ichar   
)

Method: SysGetgrnam

Return group name information from the group file.

Parameters
userThe group name.
icharThe option string.
Returns
Option information

Definition at line 684 of file rxunixsys.cpp.

◆ RexxRoutine2() [11/14]

RexxRoutine2 ( RexxObjectPtr  ,
SysGetpwnam  ,
CSTRING  ,
user  ,
CSTRING  ,
ichar   
)

Method: SysGetpwnam

Return user name information from the passwd file.

Parameters
userThe user name.
icharThe option string.
Returns
Option information

Definition at line 584 of file rxunixsys.cpp.

◆ RexxRoutine2() [12/14]

RexxRoutine2 ( RexxObjectPtr  ,
SysGetpwuid  ,
int  ,
uid  ,
CSTRING  ,
ichar   
)

Method: SysGetpwuid

Return user name information from the passwd file.

Parameters
userThe uid.
icharThe option string.
Returns
Option information

Definition at line 634 of file rxunixsys.cpp.

◆ RexxRoutine2() [13/14]

RexxRoutine2 ( RexxObjectPtr  ,
SysSetpgid  ,
int  ,
pid1  ,
int  ,
pid2   
)

Method: SysSetpgid

Set the pgid.

Parameters
pid1The pid to set.
pid2The new pid.
Returns
0 or -1

Definition at line 323 of file rxunixsys.cpp.

◆ RexxRoutine2() [14/14]

RexxRoutine2 ( RexxObjectPtr  ,
SysStat  ,
CSTRING  ,
fname  ,
CSTRING  ,
ichar   
)

Method: SysStat

Return information from the stat API.

Parameters
userThe file name.
icharThe option string.
Returns
Option information

Definition at line 772 of file rxunixsys.cpp.

◆ RexxRoutine3() [1/4]

RexxRoutine3 ( int  ,
SysChown  ,
CSTRING  ,
path1  ,
int  ,
uid  ,
int  ,
gid   
)

Method: SysChown

Change the owner and group of a file.

Parameters
path1The file path.
uidThe new userid.
gidThe new groupid.
Returns
int error code

Definition at line 486 of file rxunixsys.cpp.

◆ RexxRoutine3() [2/4]

RexxRoutine3 ( int  ,
SysLchown  ,
CSTRING  ,
path1  ,
int  ,
uid  ,
int  ,
gid   
)

Method: SysLchown

Change the owner and group of a file.

Parameters
path1The file path.
uidThe new userid.
gidThe new groupid.
Returns
int error code

Definition at line 509 of file rxunixsys.cpp.

◆ RexxRoutine3() [3/4]

RexxRoutine3 ( RexxObjectPtr  ,
SysGetservbyname  ,
CSTRING  ,
name  ,
CSTRING  ,
proto  ,
CSTRING  ,
ichar   
)

Method: SysGetservbyname

Return service information from the services file.

Parameters
nameThe service name.
protoThe service protocol.
optionThe option string.
Returns
Option information

Definition at line 937 of file rxunixsys.cpp.

◆ RexxRoutine3() [4/4]

RexxRoutine3 ( RexxObjectPtr  ,
SysGetservbyport  ,
int  ,
port  ,
CSTRING  ,
proto  ,
CSTRING  ,
ichar   
)

Method: SysGetservbyport

Return service information from the services file.

Parameters
portThe service port.
protoThe service protocol.
optionThe option string.
Returns
Option information

Definition at line 984 of file rxunixsys.cpp.

Variable Documentation

◆ orxnixclib_methods

RexxMethodEntry orxnixclib_methods[]
Initial value:
= {
}

Definition at line 1715 of file rxunixsys.cpp.

◆ orxnixclib_package_entry

RexxPackageEntry orxnixclib_package_entry
Initial value:
= {
"rxunixsys",
"1.0.0",
NULL,
}
#define REXX_INTERPRETER_4_0_0
Definition: oorexxapi.h:216
#define STANDARD_PACKAGE_HEADER
Definition: oorexxapi.h:230
RexxMethodEntry orxnixclib_methods[]
Definition: rxunixsys.cpp:1715
RexxRoutineEntry orxnixclib_routines[]
Definition: rxunixsys.cpp:1650
static void orxnixclib_loader(RexxThreadContext *context)
Definition: rxunixsys.cpp:1645

Definition at line 1720 of file rxunixsys.cpp.

◆ orxnixclib_routines

RexxRoutineEntry orxnixclib_routines[]

Definition at line 1650 of file rxunixsys.cpp.