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

Diff for /src/usr.bin/calendar/io.c between version 1.46 and 1.47

version 1.46, 2017/08/21 21:41:13 version 1.47, 2017/09/25 19:13:56
Line 385 
Line 385 
         struct stat sbuf;          struct stat sbuf;
         int nread, pdes[2], status;          int nread, pdes[2], status;
         char buf[1024];          char buf[1024];
         pid_t pid;          pid_t pid = -1;
   
         if (!doall)          if (!doall)
                 return;                  return;
Line 422 
Line 422 
                 (void)write(pdes[1], buf, nread);                  (void)write(pdes[1], buf, nread);
         (void)close(pdes[1]);          (void)close(pdes[1]);
 done:   (void)fclose(fp);  done:   (void)fclose(fp);
         while (waitpid(pid, &status, 0) == -1) {          if (pid != -1) {
                 if (errno != EINTR)                  while (waitpid(pid, &status, 0) == -1) {
                         break;                          if (errno != EINTR)
                                   break;
                   }
         }          }
 }  }
   

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.47