QNX RTOS v4 Knowledge Base
QNX RTOS v4 Knowledge Base
Title |
Catching a callback when vedit is exiting |
Ref. No. |
QNX.000009942 |
Category(ies) |
Development |
Issue |
We want to catch a callback when vedit is exiting.. Can this be done with some combination of WaitPid or something like that?x09
|
Solution |
Check out the Pt_CB_TTY_TERMINATED callback and the PtTtyWaitPid() function in the docs. Here the solution that requires the least amount of hand-written code:
x09Set the Pt_TERM_CURSOR_TIMER flag in Pt_ARG_TERM_CURSOR_FLAGS. x09Attach a Pt_CB_RAW callback to the Ph_EV_TIMER event. x09In the callback function, do something like x09x09int exit_status; x09x09if(PtTtyWaitPid(widget, &exit_status) > 0) x09x09x09vedit_has_terminated(exit_status); x09x09x09 |
|