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)
 
 RexxRoutine2 (int, SysEuidaccess, 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 1711 of file rxunixsys.cpp.

◆ RexxRoutine0() [1/15]

RexxRoutine0 ( int  ,
SysGeterrno   
)

Method: SysGeterrno

Get the errno value.

Returns
errno.

Definition at line 1416 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 1245 of file rxunixsys.cpp.

◆ RexxRoutine0() [3/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysGetegid   
)

Method: SysGetegid

Get the effective groupid.

Returns
0 or -1

Definition at line 294 of file rxunixsys.cpp.

◆ RexxRoutine0() [4/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysGeteuid   
)

Method: SysGeteuid

Get the effective userid.

Returns
uid

Definition at line 228 of file rxunixsys.cpp.

◆ RexxRoutine0() [5/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysGetgid   
)

Method: SysGetgid

Get the groupid.

Returns
0 or -1

Definition at line 261 of file rxunixsys.cpp.

◆ RexxRoutine0() [6/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysGethostname   
)

Method: SysGethostname

Get the machine hostname.

Returns
hostname.

Definition at line 1261 of file rxunixsys.cpp.

◆ RexxRoutine0() [7/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysGetpgrp   
)

Method: SysGetpgrp

Get the pgrp.

Returns
0 or -1

Definition at line 324 of file rxunixsys.cpp.

◆ RexxRoutine0() [8/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysGetpid   
)

Method: SysGetpid

Get the pid.

Returns
pid

Definition at line 378 of file rxunixsys.cpp.

◆ RexxRoutine0() [9/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysGetppid   
)

Method: SysGetppid

Get the ppid.

Returns
pid

Definition at line 393 of file rxunixsys.cpp.

◆ RexxRoutine0() [10/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysGettid   
)

Method: SysGettid

Get the tid.

Returns
tid

Definition at line 408 of file rxunixsys.cpp.

◆ RexxRoutine0() [11/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysGettzname1   
)

Method: SysGettzname1

Return the timezone name.

Returns
RexxStringObject.

Definition at line 1685 of file rxunixsys.cpp.

◆ RexxRoutine0() [12/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysGettzname2   
)

Method: SysGettzname2

Return the altername timezone name.

Returns
RexxStringObject.

Definition at line 1701 of file rxunixsys.cpp.

◆ RexxRoutine0() [13/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysGetuid   
)

Method: SysGetuid

Get the userid.

Returns
uid

Definition at line 195 of file rxunixsys.cpp.

◆ RexxRoutine0() [14/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysSetpgrp   
)

Method: SysSetpgrp

Set the pgrp.

Returns
0 or -1

Definition at line 309 of file rxunixsys.cpp.

◆ RexxRoutine0() [15/15]

RexxRoutine0 ( RexxObjectPtr  ,
SysSetsid   
)

Method: SysSetsid

Set the Session id.

Returns
Process id

Definition at line 142 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 548 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 582 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 1640 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 565 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 485 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 1657 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 1431 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 362 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 161 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 278 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 212 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 245 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 179 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 108 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 1103 of file rxunixsys.cpp.

◆ RexxRoutine2() [1/15]

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 971 of file rxunixsys.cpp.

◆ RexxRoutine2() [2/15]

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 1284 of file rxunixsys.cpp.

◆ RexxRoutine2() [3/15]

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

Method: SysEuidaccess

Return access information using the effective userid.

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

Definition at line 993 of file rxunixsys.cpp.

◆ RexxRoutine2() [4/15]

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 427 of file rxunixsys.cpp.

◆ RexxRoutine2() [5/15]

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 467 of file rxunixsys.cpp.

◆ RexxRoutine2() [6/15]

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 1622 of file rxunixsys.cpp.

◆ RexxRoutine2() [7/15]

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 75 of file rxunixsys.cpp.

◆ RexxRoutine2() [8/15]

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 447 of file rxunixsys.cpp.

◆ RexxRoutine2() [9/15]

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

Method: SysCrypt

Encrypt a string.

Parameters
strThe string to encrypt.
saltThe two character salt.
Returns
Encrypted string.

Definition at line 1589 of file rxunixsys.cpp.

◆ RexxRoutine2() [10/15]

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 745 of file rxunixsys.cpp.

◆ RexxRoutine2() [11/15]

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 701 of file rxunixsys.cpp.

◆ RexxRoutine2() [12/15]

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 601 of file rxunixsys.cpp.

◆ RexxRoutine2() [13/15]

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 651 of file rxunixsys.cpp.

◆ RexxRoutine2() [14/15]

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 343 of file rxunixsys.cpp.

◆ RexxRoutine2() [15/15]

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 789 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 506 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 529 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 1016 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 1060 of file rxunixsys.cpp.

Variable Documentation

◆ orxnixclib_methods

RexxMethodEntry orxnixclib_methods[]
Initial value:
= {
}

Definition at line 1779 of file rxunixsys.cpp.

◆ orxnixclib_package_entry

RexxPackageEntry orxnixclib_package_entry
Initial value:
= {
"OrxNixCLib",
"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:1779
RexxRoutineEntry orxnixclib_routines[]
Definition: rxunixsys.cpp:1716
static void orxnixclib_loader(RexxThreadContext *context)
Definition: rxunixsys.cpp:1711

Definition at line 1784 of file rxunixsys.cpp.

◆ orxnixclib_routines

RexxRoutineEntry orxnixclib_routines[]

Definition at line 1716 of file rxunixsys.cpp.