/mandos/trunk

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

« back to all changes in this revision

Viewing changes to plugins.d/usplash.c

  • Committer: Teddy Hogeborn
  • Date: 2009-09-17 04:16:32 UTC
  • Revision ID: teddy@fukt.bsnet.se-20090917041632-7m1rm83pxguw5zw7
* 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 };