仔细看下tpterm()错误来路是这样的:
/* use system buffer to send message */
if (_wsc_resetbuff(_TCARG,&WSC->_WSC__wscmsg, RPCRQ, sizeof(TMMSG)) == -1) {
(void)_wsc_drop(_TCARG);
if (GET_TPERRNO() == TPESYSTEM) {
SET_TPERRORDETAIL(TPED_TERM);
}
(void)_wsc_atmileave(_TCARG,0);
TMDBG_SET(WSC->_WSC__tmdbg_retid,50); goto retlab;
}
(void)strcpy(MSGTYPE(WSC->_WSC__wscmsg),"VOID");
WSC_OPCODE(WSC->_WSC__wscmsg,OWS_TERM);
WSC->_WSC__wscmsg->datalen = 0;
if (_wsc_msgsnd(_TCARG,WSC->_WSC__wscmsg) == -1) {
(void)_wsc_drop(_TCARG);
WSCERRSET(TPESYSTEM);
if (GET_TPERRNO() == TPESYSTEM) {
SET_TPERRORDETAIL(TPED_TERM);
}
(void)userlog(_MHS_(LIBWSC_CAT,1025,MHS_USERLOG,"ERROR: Unable to send tpterm() request"));
(void)_wsc_atmileave(_TCARG,0);
TMDBG_SET(WSC->_WSC__tmdbg_retid,60); goto retlab;
}