Changeset c42a9f in git for Singular


Ignore:
Timestamp:
Nov 28, 2013, 1:30:43 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
97c955673163791556ce689e78decfc0889d6488
Parents:
c7bc5eaff214c4b2bb12986bdb87bced28aea9bccfe30abe22f2a184395e76b6d76d31f81a5c84d8
Message:
Merge pull request #435 from steenpass/waitpid_sw

chg: do another waitpid() after nanosleep() succeeded
Location:
Singular
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/blackbox.cc

    rcfe30a rc42a9f  
    2020blackbox* getBlackboxStuff(const int t)
    2121{
    22   return (blackboxTable[t-BLACKBOX_OFFSET]);
     22  if (t>MAX_TOK)  /*MAX_TOK+1 is BLACKBOX_OFFSET*/
     23    return (blackboxTable[t-BLACKBOX_OFFSET]);
     24  else
     25    return NULL;
    2326}
    2427
  • Singular/links/ssiLink.cc

    rc7bc5e rc42a9f  
    11421142        struct timespec rem;
    11431143        int r;
    1144         int wait=0;
    11451144        do
    11461145        {
     
    11481147          t = rem;
    11491148        } while ((r < 0) && (errno == EINTR)
    1150             && ((wait = si_waitpid(d->pid,NULL,WNOHANG)) == 0));
    1151         if ((r == 0) && (wait == 0))
     1149            && (si_waitpid(d->pid,NULL,WNOHANG) == 0));
     1150        if ((r == 0) && (si_waitpid(d->pid,NULL,WNOHANG) == 0))
    11521151        {
    11531152          kill(d->pid,15);
     
    11591158            t = rem;
    11601159          } while ((r < 0) && (errno == EINTR)
    1161               && ((wait = si_waitpid(d->pid,NULL,WNOHANG)) == 0));
    1162           if ((r == 0) && (wait == 0))
     1160              && (si_waitpid(d->pid,NULL,WNOHANG) == 0));
     1161          if ((r == 0) && (si_waitpid(d->pid,NULL,WNOHANG) == 0))
    11631162          {
    11641163            kill(d->pid,9); // just to be sure
Note: See TracChangeset for help on using the changeset viewer.