/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release

« back to all changes in this revision

Viewing changes to plugins.d/usplash.c

* plugins.d/usplash.c (main): Bug fix: only close FIFO if opened.

Show diffs side-by-side

added added

removed removed

Lines of Context:
612
612
  }
613
613
  
614
614
  /* Close FIFO (again) */
615
 
  ret = (int)TEMP_FAILURE_RETRY(close(fifo_fd));
616
 
  if(ret == -1 and errno != EINTR){
617
 
    perror("close");
 
615
  if(fifo_fd != -1){
 
616
    ret = (int)TEMP_FAILURE_RETRY(close(fifo_fd));
 
617
    if(ret == -1 and errno != EINTR){
 
618
      perror("close");
 
619
    }
 
620
    fifo_fd = -1;
618
621
  }
619
 
  fifo_fd = -1;
620
622
  
621
623
  if(interrupted_by_signal){
622
624
    struct sigaction signal_action = { .sa_handler = SIG_DFL };