c_block_cleanup - Masks the SIGTERM signal so that it is blocked until the critical section of code has completed

SYNTAX

#include "las.h"
#include "worgen.h"
int c_block_cleanup
(
   sigset_t *oldmask   /* O: status of signal mask before SIGTERM was masked
                             to be blocked */
)

PARAMETERS

oldmask (output, sigset_t *)

Pointer to sigset_t variable that contains the status of the signal mask before SIGTERM was masked to be blocked.

DESCRIPTION

The c_block_cleanup() routine is used to mask the SIGTERM signal so that it is blocked until the critical section of code has completed. The routine c_unblock_cleanup() can be used to unblock the SIGTERM signal after the critical section of code has completed. E_SUCC is returned if the block was successful. E_FAIL is returned if an error occurred blocking SIGTERM.

RETURN VALUE

c_block_cleanup() returns

     E_SUCC (0)  --> successful completion
     E_FAIL (-1) --> operation failed