Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pg/pgshmemcleanup.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pg/pgshmemcleanup.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pg/pgshmemcleanup.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pg/pgshmemcleanup.html on line 8

PgShmemCleanup()

Remove shared memory references

Synopsis:

void PgShmemCleanup();

Library:

ph

Description:

This function removes all shared memory references that you defined with PgShmemCreate() and PgShmemAttach(). If you created the block with PgShmemCreate(), the block is unlinked.

The Photon library uses atexit() to arrange for PgShmemCleanup() to be called when your program terminates normally. If your program terminates abnormally, it should call PgShmemCleanup() explicitly.

Examples:

This code fragment shows how you can use PgShmemCleanup() in a signal handler:

void ExitCleanup( int sig ) {    
    sig = sig;
    PgShmemCleanup();
    _exit( 1 );
}


main( ... ) {
…
    signal( SIGTERM, ExitCleanup );
    signal( SIGHUP, ExitCleanup );
    signal( SIGQUIT, ExitCleanup );
    signal( SIGINT, ExitCleanup );

    /* main loop */
…
}

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PgShmemAttach(), PgShmemCreate()

atexit() in the QNX Neutrino Library Reference


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pg/pgshmemcleanup.html on line 125

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pg/pgshmemcleanup.html on line 125