Changeset 3857cb in git


Ignore:
Timestamp:
May 18, 2011, 1:01:48 PM (12 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
Children:
aab0bf3d4a3784735075a5752e502e6079f5a741
Parents:
3ce6179e64007d5422ec76066d381fcaf21651f9
Message:
waitpid fix for ssi

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

Legend:

Unmodified
Added
Removed
  • Singular/ssiLink.cc

    r3ce617 r3857cb  
    984984  if (d!=NULL)
    985985  {
     986    if (d->r!=NULL) rKill(d->r);
    986987    if ((strcmp(l->mode,"tcp")==0)
    987988    || (strcmp(l->mode,"fork")==0))
    988989    {
    989       if (d->send_quit_at_exit)
    990       {
    991         fprintf(d->f_write,"99\n");fflush(d->f_write);
    992       }
    993990      link_list hh=ssiToBeClosed;
    994991      if (hh!=NULL)
     
    10111008        }
    10121009      }
     1010      if (d->send_quit_at_exit)
     1011      {
     1012        fprintf(d->f_write,"99\n");fflush(d->f_write);
     1013      }
    10131014    }
    10141015    if (d->f_read!=NULL) fclose(d->f_read);
    10151016    if (d->f_write!=NULL) fclose(d->f_write);
    1016     if (d->r!=NULL) rKill(d->r);
    10171017    if (d->pid!=0)
    10181018    {
    10191019      int status;
    1020       kill(d->pid,15);
    1021       waitpid(d->pid,&status,WNOHANG);
     1020      if (kill(d->pid,15)!=0)
     1021      {
     1022         waitpid(d->pid,&status,WNOHANG);
     1023      }
    10221024    }
    10231025    omFreeSize((ADDRESS)d,(sizeof *d));
Note: See TracChangeset for help on using the changeset viewer.