IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 28, 2010, 11:51:46 AM (16 years ago)
Author:
eugene
Message:

redirect pcontrol stderr to log file; add bits to harvest zombies that may accumulate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/pcontrol/pcontrol.c.in

    r18098 r28158  
    11# include "pcontrol.h"
     2
     3# define STDERR_FILE "pcontrol.log"
    24
    35# define opihi_name "PCONTROL"
     
    2426  signal (SIGTSTP, gotsignal);
    2527  signal (SIGTTIN, gotsignal);
     28
     29  // stdin / stdout are used for communication with pantasks.
     30  // redirect stderr so various error messages are saved
     31  stderr = freopen (STDERR_FILE, "a", stderr);
     32  if (!stderr) {
     33      fprintf (stdout, "failed to open %s for error output\n", STDERR_FILE);
     34      exit (1);
     35  }
    2636
    2737  rl_readline_name = opihi_name;
Note: See TracChangeset for help on using the changeset viewer.