![]() |
![]()
| ![]() |
![]()
NAMEQuit — terminate an operation or an entire tool SYNOPSISQuit(in boolean silent, DESCRIPTIONThe Quit request terminates an operation or an entire tool. Without the optional operation2Quit argument, this request asks the handling procid to quit. If the request succeeds, one or more ToolTalk procids should call tt_close(3), and zero or more processes should exit. With the optional operation2Quit argument, this request asks the handler to terminate the indicated request. (Whether the terminated request must therefore be failed depends on its semantics. Often, termination can be considered to mean that the requested operation has been carried out to the requester's satisfaction.) The Quit request should be failed (and the status code set appropriately) when the termination is not performed--for example, because the silent argument was false and the user canceled the quit. The silent argument affects user notification of termination. If silent is True, the handler is not allowed to block on user input before terminating itself (or the indicated operation). If it is False, however, the handler may seek such input. The force argument is a Boolean value indicating whether the handler should terminate itself (or the indicated operation) even if circumstances are such that the tool ordinarily would not perform the termination. For example, a tool might have a policy of not quitting with unsaved changes unless the user has been asked whether the changes should be saved. When force is true, such a tool should terminate even when doing so would lose changes that the user has not been asked by the tool about saving. The operation2Quit argument is the request that should be terminated. For a request to be terminable, the handler must have sent a Status notice back to the requester (thus identifying itself to the requester). ERRORSThe ToolTalk service may return one of the following errors in processing the Quit request:
APPLICATION USAGEThe ttdt_session_join(3), and ttdt_message_accept(3), functions can be used to register for, and help process, the Quit request. In the successful case, ``zero or more'' procids are cited because a single process can instantiate multiple independent procids, and a single procid can conceivably be implemented by a set of cooperating processes. EXAMPLESThe Quit request can be sent as in the following example: Tt_message msg = tttk_message_create(0, TT_REQUEST, TT_SESSION, WARNINGSQuit can also be sent as a multicast notice, as an edict to all tools in the scope of the message. The consequences of doing so can be severe and unexpected. SEE ALSOtt_close(3), tt_message_iarg_add(3), tt_message_send(3), ttdt_message_accept(3), ttdt_session_join(3).
|