Changeset f3b9c82 in git


Ignore:
Timestamp:
Nov 27, 2013, 2:45:54 PM (9 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '5bec8f88c9ee2573d328cf7c3aff2bcb301d2395')
Children:
d3063fda87edfbb83154427f69508683dd741123
Parents:
c6d3fc466dfd65a90389184c556ed357ac5c5d6fd9c46b7a02e3941c5c90ca24da6b4b0e465c6569
Message:
Merge pull request #431 from steenpass/nanosleep_sw

chg: restart nanosleep when interrupted by signal
Location:
Singular
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/primdec.lib

    rd9c46b rf3b9c82  
    4040 zerodec(I);       zerodimensional decomposition via Monico
    4141 absPrimdecGTZ(I); the absolute prime components of I
     42 sep(f,k);         the separabel part of f as polynomial in Fp(t1,...,tm)
    4243";
    4344
  • Singular/links/ssiLink.cc

    rc6d3fc4 rf3b9c82  
    11401140        t.tv_sec=0;
    11411141        t.tv_nsec=100000000; // <=100 ms
    1142         int r=si_nanosleep(&t,NULL);
    1143         if((r==0) && (si_waitpid(d->pid,NULL,WNOHANG)==0))
     1142        struct timespec rem;
     1143        int r;
     1144        int wait;
     1145        do
     1146        {
     1147          r = nanosleep(&t, &rem);
     1148          t = rem;
     1149        } while ((r < 0) && (errno == EINTR)
     1150            && ((wait = si_waitpid(d->pid,NULL,WNOHANG)) == 0));
     1151        if ((r == 0) && (wait == 0))
    11441152        {
    11451153          kill(d->pid,15);
    11461154          t.tv_sec=5; // <=5s
    11471155          t.tv_nsec=0;
    1148           r=si_nanosleep(&t,NULL);
    1149           if((r==0)&&(si_waitpid(d->pid,NULL,WNOHANG)==0))
     1156          do
     1157          {
     1158            r = nanosleep(&t, &rem);
     1159            t = rem;
     1160          } while ((r < 0) && (errno == EINTR)
     1161              && ((wait = si_waitpid(d->pid,NULL,WNOHANG)) == 0));
     1162          if ((r == 0) && (wait == 0))
    11501163          {
    11511164            kill(d->pid,9); // just to be sure
Note: See TracChangeset for help on using the changeset viewer.