Changeset 85ab8cd in git


Ignore:
Timestamp:
Sep 13, 2010, 1:54:30 PM (14 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
c292b2f02aae398d9441027fcf6031ee977365e1
Parents:
e1552a7c374c11d8834e99a831c6404fe8a0c80d
Message:
porting

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

Legend:

Unmodified
Added
Removed
  • Singular/cntrlc.cc

    re1552a r85ab8cd  
    7272#endif
    7373
     74si_link pipeLastLink=NULL;
     75
     76void sig_pipe_hdl(int sig)
     77{
     78 if (pipeLastLink!=NULL)
     79 {
     80   slClose(pipeLastLink);
     81   pipeLastLink=NULL;
     82   WerrorS("pipe failed");
     83 }
     84}
     85
    7486/*---------------------------------------------------------------------*
    7587 * File scope Variables (Variables share by several functions in
     
    105117**/
    106118/*---------------------------------------------------------------------*/
    107 si_hdl_typ si_set_signal (
    108   int sig,
    109   si_hdl_typ signal_handler
    110   )
     119si_hdl_typ si_set_signal ( int sig, si_hdl_typ signal_handler)
    111120{
    112121  si_hdl_typ retval=signal (sig, (si_hdl_typ)signal_handler);
     
    221230}
    222231
    223 si_link pipeLastLink=NULL;
    224 
    225 void sig_pipe_hdl(int sig)
    226 {
    227  if (pipeLastLink!=NULL)
    228  {
    229    slClose(pipeLastLink);
    230    pipeLastLink=NULL;
    231    WerrorS("pipe failed");
    232  }
    233 }
    234 
    235232/*2
    236233* init signal handlers, linux/i386 version
     
    307304  si_set_signal(SIGINT ,sigint_handler);
    308305  si_set_signal(SIGCHLD, (void (*)(int))SIG_IGN);
     306  si_set_signal(SIGPIPE, (si_hdl_typ)sig_pipe_hdl);
    309307}
    310308#else
     
    369367  si_set_signal(SIGCHLD, (void (*)(int))SIG_IGN);
    370368  #endif
     369  si_set_signal(SIGPIPE, (si_hdl_typ)sig_pipe_hdl);
    371370}
    372371#endif
Note: See TracChangeset for help on using the changeset viewer.