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

Diff for /src/usr.bin/sndiod/file.c between version 1.17 and 1.18

version 1.17, 2016/01/08 10:50:26 version 1.18, 2016/01/08 13:09:42
Line 46 
Line 46 
   
 #include <sys/types.h>  #include <sys/types.h>
   
 #include <err.h>  
 #include <errno.h>  #include <errno.h>
 #include <fcntl.h>  #include <fcntl.h>
 #include <poll.h>  #include <poll.h>
Line 399 
Line 398 
                 timo = -1;                  timo = -1;
         res = poll(pfds, nfds, timo);          res = poll(pfds, nfds, timo);
         if (res < 0) {          if (res < 0) {
                 if (errno != EINTR)                  if (errno != EINTR) {
                         err(1, "poll");                          log_puts("poll failed");
                           panic();
                   }
                 return 1;                  return 1;
         }          }
   
Line 442 
Line 443 
 {  {
         sigset_t set;          sigset_t set;
   
         sigemptyset(&set);  
         (void)sigaddset(&set, SIGPIPE);  
         if (sigprocmask(SIG_BLOCK, &set, NULL))  
                 err(1, "sigprocmask");  
         file_list = NULL;  
         if (clock_gettime(CLOCK_MONOTONIC, &file_ts) < 0) {          if (clock_gettime(CLOCK_MONOTONIC, &file_ts) < 0) {
                 perror("clock_gettime");                  log_puts("filelist_init: CLOCK_MONOTONIC unsupported\n");
                 exit(1);                  panic();
         }          }
           sigemptyset(&set);
           sigaddset(&set, SIGPIPE);
           sigprocmask(SIG_BLOCK, &set, NULL);
           file_list = NULL;
         log_sync = 0;          log_sync = 0;
         timo_init();          timo_init();
 }  }

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18