Diff for /freem/src/sighnd.c between versions 1.5 and 1.8

version 1.5, 2025/03/24 00:38:40 version 1.8, 2025/04/15 16:49:36
Line 24 Line 24
  *   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.   *   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.
  *   *
  *   $Log$   *   $Log$
    *   Revision 1.8  2025/04/15 16:49:36  snw
    *   Make use of logprintf throughout codebase
    *
    *   Revision 1.7  2025/04/10 01:24:38  snw
    *   Remove C++ style comments
    *
    *   Revision 1.6  2025/03/24 04:15:25  snw
    *   Create dummy onwinch signal handler for OS/2
    *
  *   Revision 1.5  2025/03/24 00:38:40  snw   *   Revision 1.5  2025/03/24 00:38:40  snw
  *   Fix termios junk in sighnd.c   *   Fix termios junk in sighnd.c
  *   *
Line 73 Line 82
 #include "events.h"  #include "events.h"
 #include "jobtab.h"  #include "jobtab.h"
 #include "shmmgr.h"  #include "shmmgr.h"
   #include "log.h"
   
   
   
 void m_log (int, const char *);  
 int pending_signal_type = -1;  int pending_signal_type = -1;
   
 void sig_attach(int sig, void *handler)  void sig_attach(int sig, void *handler)
Line 87  void sig_attach(int sig, void *handler) Line 95  void sig_attach(int sig, void *handler)
 #if !defined(__AMIGA)      #if !defined(__AMIGA)    
     sigaction (sig, &act, NULL);      sigaction (sig, &act, NULL);
 #else  #else
     //TODO: fill in for m68k-amigaos      /* TODO: fill in for m68k-amigaos */
 #endif  #endif
 }  }
   
Line 139  void onwinch (void) Line 147  void onwinch (void)
   
     return;      return;
 }  }
   #else
   void onwinch (void)
   {
       sig_attach (SIGWINCH, &onwinch);
   
       return;
   }
 #endif  #endif
   
 void onintr (void)  void onintr (void)
 {  {
     sig_attach (SIGINT, &onintr); /* restore handler */      sig_attach (SIGINT, &onintr); /* restore handler */
   
     //printf ("\r\nSIGINT codptr = '%s'\r\n", codptr);      /* printf ("\r\nSIGINT codptr = '%s'\r\n", codptr); */
           
     if (first_process) {      if (first_process) {
         job_request_stop (pid);          job_request_stop (pid);
Line 279  void onhup (void) Line 294  void onhup (void)
   
   
     if (run_daemon == TRUE) {      if (run_daemon == TRUE) {
         fprintf (stderr, "freem:  daemon received SIGHUP\r\n");          logprintf (FM_LOG_INFO, "environment:  daemon received SIGHUP\r\n");
         m_log (1, "freem:  daemon received SIGHUP");  
   
         sig_attach (SIGHUP, &onhup);       /* restore handler */          sig_attach (SIGHUP, &onhup);       /* restore handler */
                   

Removed from v.1.5  
changed lines
  Added in v.1.8


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>