posix module reference¶
Interface to the libc POSIX API.
Data Types¶
Container for the jump point buffer created by setjmp(). |
|
Container for the jump point buffer (with signals) created by sigsetjmp() |
Functions/Subroutines¶
Change mode of a file. |
|
Create a signal handler |
|
Send signal |
|
Get the ID of the current process. |
|
Get the ID of the parent process of the current process. |
|
Force the process to a sleep state for |
|
Restore program to state saved by |
|
Restore program to state saved by |
|
Placeholder function for a missing or unconfigured setjmp. |
|
Placeholder function for a missing or unconfigured longjmp. |
|
Placeholder function for a missing or unconfigured sigsetjmp. |
|
Placeholder function for a missing or unconfigured siglongjmp. |
Detailed Description¶
Interface to the libc POSIX API.
Type Documentation¶
-
type
posix/
jmp_buf
¶ Container for the jump point buffer created by setjmp().
- Type fields:
%
state
[character (kind=c_char)(200)] :: Unstructured array of bytes used to store the process state.
-
type
posix/
sigjmp_buf
¶ Container for the jump point buffer (with signals) created by sigsetjmp()
- Type fields:
%
state
[character (kind=c_char)( 200)] :: Unstructured array of bytes used to store the process state.
Function/Subroutine Documentation¶
-
function
posix/
chmod
(path, mode) [integer]¶ Change mode of a file.
This changes the file permission of file
path
tomode
following POSIX conventions. If successful, it returns zero. Otherwise, it returns -1.- Called from:
mom_file_parser_tests::cleanup_open_param_file_ioerr
-
function
posix/
signal
(sig, func) [procedure(handler_interface)]¶ Create a signal handler
handle
to be called whensig
is detected.If successful, the previous handler for
sig
is returned. Otherwise, SIG_ERR is returned.
-
function
posix/
kill
(pid, sig) [integer]¶ Send signal
sig
to processpid
.If successful, this function returns 0. Otherwise, it returns -1.
-
function
posix/
getpid
() [integer]¶ Get the ID of the current process.
-
function
posix/
getppid
() [integer]¶ Get the ID of the parent process of the current process.
-
function
posix/
sleep
(seconds) [integer]¶ Force the process to a sleep state for
seconds
seconds.The sleep state may be interrupted by a signal. If it sleeps for the entire duration, then it returns 0. Otherwise, it returns the number of seconds remaining at the point of interruption.
- Called from:
-
subroutine
posix/
longjmp
(env, val)¶ Restore program to state saved by
env
, and return the valueval
.This “nonlocal goto” alters program execution to the state stored in
env
produced by a prior execution ofsetjmp
. Program execution is moved back to thissetjmp
, except the function will now returnval
.
-
subroutine
posix/
siglongjmp
(env, val)¶ Restore program to state saved by
env
, and return the valueval
.This “nonlocal goto” alters program execution to the state stored in
env
produced by a prior execution ofsetjmp
. Program execution is moved back to thissetjmp
, except the function will now returnval
.siglongjmp
behaves in the same manner aslongjmp
, but also provides predictable handling of the signal state.
-
function
posix/
setjmp_missing
(env) [integer(kind=c_int)]¶ Placeholder function for a missing or unconfigured setjmp.
- Parameters:
env :: [in] Current process state (unused)
- Return:
undefined :: Function return code (unused)
-
subroutine
posix/
longjmp_missing
(env, val)¶ Placeholder function for a missing or unconfigured longjmp.
- Parameters:
env :: [in] Current process state (unused)
val :: [in] Enable signal state flag (unused)
-
function
posix/
sigsetjmp_missing
(env, savesigs) [integer(kind=c_int)]¶ Placeholder function for a missing or unconfigured sigsetjmp.
- Parameters:
env :: [in] Current process state (unused)
savesigs :: [in] Enable signal state flag (unused)
- Return:
undefined :: Function return code (unused)
-
subroutine
posix/
siglongjmp_missing
(env, val)¶ Placeholder function for a missing or unconfigured siglongjmp.
- Parameters:
env :: [in] Current process state (unused)
val :: [in] Enable signal state flag (unused)