Changeset 7626c5f in git for Singular/cntrlc.cc


Ignore:
Timestamp:
Apr 8, 2011, 11:33:50 AM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
1da23e5a8e69792bb0f66403041e781d0ab13fa5
Parents:
f9e6d7592f3b35aaff38fe73f121615de78b162c
Message:
SIGTERM handler to close ssi links

git-svn-id: file:///usr/local/Singular/svn/trunk@14118 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/cntrlc.cc

    rf9e6d7 r7626c5f  
    8282   pipeLastLink=NULL;
    8383   WerrorS("pipe failed");
     84 }
     85}
     86
     87void sig_term_hdl(int sig)
     88{
     89 while (ssiToBeClosed!=NULL)
     90 {
     91   slClose(ssiToBeClosed->l);
     92   ssiToBeClosed=(link_list)ssiToBeClosed->next;
    8493 }
    8594}
     
    230239**/
    231240/*---------------------------------------------------------------------*/
    232 void sig_ign_hdl(int sig)
     241void sig_chld_hdl(int sig)
    233242{
    234243 waitpid(-1,NULL,WNOHANG); 
     
    261270    PrintS("cannot set signal handler for INT\n");
    262271  }
    263   si_set_signal(SIGCHLD, (si_hdl_typ)sig_ign_hdl);
     272  si_set_signal(SIGCHLD, (si_hdl_typ)sig_chld_hdl);
    264273  si_set_signal(SIGPIPE, (si_hdl_typ)sig_pipe_hdl);
     274  si_set_signal(SIGTERM, (si_hdl_typ)sig_term_hdl);
    265275}
    266276
Note: See TracChangeset for help on using the changeset viewer.