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

PtExit()

Exit a Photon program

Synopsis:

void PtExit( int return_code );

Library:

ph

Description:

This function is similar to exit(), except that PtExit() properly destroys all your application's widgets before exiting.

In a multithreaded application, any thread can call PtExit(), but another thread might be in the middle of an important operation, such as writing a file. To prevent this situation from arising, call PtPreventExit() before starting the operation, and call PtAllowExit() when it's done.


Note: Instead of calling PtPreventExit() and PtAllowExit() directly, you're better off calling PtEnter() and PtLeave() with Pt_DELAY_EXIT set in the flags.

Returns:

This function doesn't return.

Classification:

Photon

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

See also:

PtAllowExit(), PtEnter(), PtLeave(), PtPreventExit()

exit() in the QNX 6 Library Reference


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