[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]
Technical Reference: Base Operating System and Extensions, Volume 1
kleenup Subroutine
Purpose
Cleans up the run-time environment of a process.
Library
Syntax
int kleenup( FileDescriptor, SigIgn, SigKeep)
int FileDescriptor;
int SigIgn[ ];
int SigKeep[ ];
Description
The kleenup subroutine cleans
up the run-time environment for a trusted process by:
- Closing unnecessary file descriptors.
- Resetting the alarm time.
- Resetting signal handlers.
- Clearing the value of the real
directory read flag described in the ulimit subroutine.
- Resetting the ulimit value,
if it is less than a reasonable value (8192).
Parameters
FileDescriptor |
Specifies a file descriptor. The kleenup subroutine
closes all file descriptors greater than or equal to the FileDescriptor parameter. |
SigIgn |
Points to a list of signal numbers. If these are nonnull values,
this list is terminated by 0s. Any signals specified by the SigIgn parameter are set to SIG_IGN. The handling
of all signals not specified by either this list or the SigKeep list are set to SIG_DFL. Some signals cannot
be reset and are left unchanged. |
SigKeep |
Points to a list of signal numbers. If these are nonnull values,
this list is terminated by 0s. The handling of any signals specified by the SigKeep parameter is left unchanged. The handling of
all signals not specified by either this list or the SigIgn list are set to SIG_DFL. Some signals cannot be
reset and are left unchanged. |
Return Values
The kleenup subroutine is always
successful and returns a value of 0. Errors in closing files are not reported.
It is not an error to attempt to modify a signal that the process is not allowed
to handle.
Related Information
The ulimit subroutine.
List of Security and Auditing
Subroutines and Subroutines Overview in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.
[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]