src/lib/message.c
void term_msg()
{
   Dmsg0(850, "Enter term_msg\n");
   close_msg(NULL);                   /* close global chain */
   free_msgs_res(daemon_msgs);        /* free the resources */
   daemon_msgs = NULL;
   if (con_fd) {
      fflush(con_fd);
      fclose(con_fd);
      con_fd = NULL;
   }
   if (exepath) {
      free(exepath);
      exepath = NULL;
   }
   if (exename) {
      free(exename);
      exename = NULL;
   }
   if (trace_fd) {
      fclose(trace_fd);
      trace_fd = NULL;
      trace = false;
   }
   working_directory = NULL;
   term_last_jobs_list();
}
/*
 * Terminate the message handler for good.
 * Release the global destination chain.
 *
 * Also, clean up a few other items (cons, exepath). Note,
 *   these really should be done elsewhere.
 */
Terminate the message handler for good.
Release the global destination chain.

Also, clean up a few other items (cons, exepath). Note,
these really should be done elsewhere.
Terminate the message handler for good . Release the global destination chain . Also clean up a few other items ( cons exepath ) . Note these really should be done elsewhere .
void term_msg()
{
   Dmsg0(850, "Enter term_msg\n");
   close_msg(NULL);                   
   free_msgs_res(daemon_msgs);        
   daemon_msgs = NULL;
   if (con_fd) {
      fflush(con_fd);
      fclose(con_fd);
      con_fd = NULL;
   }
   if (exepath) {
      free(exepath);
      exepath = NULL;
   }
   if (exename) {
      free(exename);
      exename = NULL;
   }
   if (trace_fd) {
      fclose(trace_fd);
      trace_fd = NULL;
      trace = false;
   }
   working_directory = NULL;
   term_last_jobs_list();
}
void term_msg ( ) { Dmsg0 ( 850 , " \n " ) ; close_msg ( NULL ) ; free_msgs_res ( daemon_msgs ) ; daemon_msgs = NULL ; if ( con_fd ) { fflush ( con_fd ) ; fclose ( con_fd ) ; con_fd = NULL ; } if ( exepath ) { free ( exepath ) ; exepath = NULL ; } if ( exename ) { free ( exename ) ; exename = NULL ; } if ( trace_fd ) { fclose ( trace_fd ) ; trace_fd = NULL ; trace = false ; } working_directory = NULL ; term_last_jobs_list ( ) ; }
Terminate the message handler for good.
Terminate the message handler for good .
/* close global chain */ /* free the resources */