[BACK]Return to aproc.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / aucat

Diff for /src/usr.bin/aucat/Attic/aproc.c between version 1.34 and 1.35

version 1.34, 2009/09/27 11:51:20 version 1.35, 2009/10/06 18:06:55
Line 58 
Line 58 
         p->name = name;          p->name = name;
         p->ops = ops;          p->ops = ops;
         p->refs = 0;          p->refs = 0;
           p->zomb = 0;
         return p;          return p;
 }  }
   
Line 66 
Line 67 
 {  {
         struct abuf *i;          struct abuf *i;
   
         /*          if (!p->zomb) {
          * XXX: souldn't call ops->done() and friends twice                  if (p->ops->done) {
          * use a ``zomb'' flag or whatever                          p->ops->done(p);
          */                  }
                   while (!LIST_EMPTY(&p->ibuflist)) {
         if (p->ops->done) {                          i = LIST_FIRST(&p->ibuflist);
                 p->ops->done(p);                          abuf_hup(i);
                   }
                   while (!LIST_EMPTY(&p->obuflist)) {
                           i = LIST_FIRST(&p->obuflist);
                           abuf_eof(i);
                   }
                   p->zomb = 1;
         }          }
         while (!LIST_EMPTY(&p->ibuflist)) {          if (p->refs > 0) {
                 i = LIST_FIRST(&p->ibuflist);  
                 abuf_hup(i);  
         }  
         while (!LIST_EMPTY(&p->obuflist)) {  
                 i = LIST_FIRST(&p->obuflist);  
                 abuf_eof(i);  
         }  
         if (p->refs > 0)  
                 return;                  return;
           }
         free(p);          free(p);
 }  }
   

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35