Changeset 7626c5f in git for Singular


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
Location:
Singular
Files:
3 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
  • Singular/silink.h

    rf9e6d7 r7626c5f  
    103103
    104104int slStatusSsiL(lists L, int timeout);
     105
     106typedef struct
     107{
     108  leftv u;
     109  si_link l;
     110  void * next;
     111} link_struct;
     112
     113typedef link_struct* link_list;
     114
     115extern link_list ssiToBeClosed;
    105116#endif // SILINK_H
  • Singular/ssiLink.cc

    rf9e6d7 r7626c5f  
    6767} ssiInfo;
    6868
    69 
    70 typedef struct
    71 {
    72   leftv u;
    73   si_link l;
    74   void * next;
    75 } link_struct;
    76 
    77 typedef link_struct* link_list;
    7869
    7970link_list ssiToBeClosed=NULL;
Note: See TracChangeset for help on using the changeset viewer.