Ignore:
Timestamp:
Nov 28, 2011, 9:56:30 PM (13 years ago)
Author:
katerina
Message:

Fix for ticket #277 (sigpipe).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_log_check.c

    r362 r379  
    876876  struct task_entry * entry;
    877877
    878   struct  sigaction   new_act;
    879   struct  sigaction   old_act;
    880 
    881878  volatile int        status;
    882879  char * tmp;
     
    886883  if (logfile->fp)
    887884    {
    888       /* ignore SIGPIPE (instead get EPIPE if connection is closed)
    889        */
    890       memset(&new_act, 0, sizeof(struct  sigaction));
    891       new_act.sa_handler = SIG_IGN;
    892       (void) retry_sigaction (FIL__, __LINE__, SIGPIPE, &new_act, &old_act);
    893 
    894885      /* Result cannot be larger than 8192, thus cast is ok
    895886       */
    896887      status = (int) sh_string_read(s, logfile->fp, 8192);
    897 
    898       /* restore old signal handler
    899        */
    900       (void) retry_sigaction (FIL__, __LINE__, SIGPIPE, &old_act, NULL);
    901888
    902889      if (status <= 0)
Note: See TracChangeset for help on using the changeset viewer.