Esempio n. 1
0
void x_ipcModError(const char *description, ...)
{
#ifndef NMP_IPC
  x_ipcStats(stderr);
#endif

#ifdef NMP_IPC
  if (ipcVerbosity >= IPC_Print_Errors)
#endif
  if (description) {
    va_list args;
    va_start(args, description);
    vfprintf(stderr, (char *)description, args);
    fprintf(stderr, "\n");
    va_end(args);
    FLUSH_IF_NEEDED(stderr);
  }
  
#ifdef NMP_IPC
  if (ipcVerbosity >= IPC_Exit_On_Errors)
#endif
  {
    x_ipcClose();
  
    LOCK_M_MUTEX;
    if (mGlobalp()) {
#ifdef LISP
      if (IS_LISP_MODULE()) {
	if (GET_M_GLOBAL(lispExitGlobal) != NULL)
	  (*(GET_M_GLOBAL(lispExitGlobal)))();
      } else
#endif /* LISP */
	{
	  if (GET_M_GLOBAL(x_ipcExitHnd)) {
	    (*(GET_M_GLOBAL(x_ipcExitHnd)))();
	  } else {
	    exit(-1);
	  }
	}
      }
    UNLOCK_M_MUTEX;
  }
}
Esempio n. 2
0
IPC_RETURN_TYPE IPC_disconnect (void)
{
  x_ipcClose();
  return IPC_OK;
}