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:

Parameters

Item Description
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.