Middleware, development tools, realtime operating system
software and services for superior embedded design


Home
QNX Community Resources
Developer Support
QNX Documentation Library
QNX Developer Support

QNX Developer Support

QNX Software Systems
Developer Resources
Blogs
Board support packages
Foundry27 projects
Forums
Hardware support listing
Online video tutorials
Product documentation
Technical Articles

[Previous] [Contents] [Index] [Next]

sigemptyset()

Initialize a set to contain no signals

Synopsis:

#include <signal.h>

int sigemptyset( sigset_t *set );

Arguments:

set
A pointer to the sigset_t object that you want to initialize.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The sigemptyset() function initializes set to contain no signals.

Returns:

0
Success.
-1
An error occurred (errno is set).

Examples:

#include <stdio.h>
#include <stdlib.h>
#include <signal.h>

void print( sigset_t set, int signo )
  {

    printf( "Set %8.8lx. Signal %d is ", set, signo );
    if( sigismember( &set, signo ) )
      printf( "a member.\n" );
    else
      printf( "not a member.\n" );
  }

int main( void )
  {
    sigset_t set;

    sigemptyset( &set );
    print( set, SIGINT );

    sigfillset( &set );
    print( set, SIGINT );

    sigdelset( &set, SIGINT );
    print( set, SIGINT );

    sigaddset( &set, SIGINT );
    print( set, SIGINT );
    return EXIT_SUCCESS;
  }

Classification:

POSIX 1003.1

Safety:
Cancellation point No
Interrupt handler Yes
Signal handler Yes
Thread Yes

See also:

kill(), raise(), sigaction(), sigaddset(), sigdelset(), sigfillset(), sigismember(), signal(), sigpending(), sigprocmask()


[Previous] [Contents] [Index] [Next]