IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 16, 2006, 10:58:49 PM (20 years ago)
Author:
eugene
Message:

major updates to use gprint for buffered / threaded printing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/pantasks/LocalJob.c

    r6687 r7917  
    2424    switch (Nread) {
    2525      case -2:  /* error in read (programming error?  system level error?) */
    26         fprintf (stderr, "serious IO error\n");
     26        gprint (GP_ERR, "serious IO error\n");
    2727        exit (2);
    2828      case -1:  /* no data in pipe */
     
    3636    switch (Nread) {
    3737      case -2:  /* error in read (programming error?  system level error?) */
    38         fprintf (stderr, "serious IO error\n");
     38        gprint (GP_ERR, "serious IO error\n");
    3939        exit (2);
    4040      case -1:  /* no data in pipe */
     
    5757      switch (errno) {
    5858        case ECHILD:
    59           fprintf (stderr, "unknown PID, not a child proc\n");
    60           fprintf (stderr, "did process already exit?  programming error?\n");
     59          gprint (GP_ERR, "unknown PID, not a child proc\n");
     60          gprint (GP_ERR, "did process already exit?  programming error?\n");
    6161          job[0].state = JOB_NONE;
    6262          job[0].exit_status = 0;
    6363          return (FALSE);
    6464        case EINVAL:
    65           fprintf (stderr, "error EINVAL (waitpid): programming error\n");
     65          gprint (GP_ERR, "error EINVAL (waitpid): programming error\n");
    6666          exit (1);
    6767        case EINTR:
    68           fprintf (stderr, "error EINTR (waitpid): programming error\n");
     68          gprint (GP_ERR, "error EINTR (waitpid): programming error\n");
    6969          exit (1);
    7070        default:
    71           fprintf (stderr, "unknown error for waitpid (%d): programming error\n", errno);
     71          gprint (GP_ERR, "unknown error for waitpid (%d): programming error\n", errno);
    7272          exit (1);
    7373      }
     
    8181    default:
    8282      if (result != job[0].pid) {
    83         fprintf (stderr, "waitpid error: mis-matched PID (%d vs %d).  programming error\n", result, job[0].pid);
     83        gprint (GP_ERR, "waitpid error: mis-matched PID (%d vs %d).  programming error\n", result, job[0].pid);
    8484        exit (1);
    8585      }
     
    9393      }
    9494      if (WIFSTOPPED(waitstatus)) {
    95         fprintf (stderr, "waitpid returns 'stopped': programming error\n");
     95        gprint (GP_ERR, "waitpid returns 'stopped': programming error\n");
    9696        exit (1);
    9797      }
     
    114114  pid = fork ();
    115115  if (!pid) { /* must be child process */
    116     if (VerboseMode()) fprintf (stderr, "starting local job\n");
     116    if (VerboseMode()) gprint (GP_ERR, "starting local job\n");
    117117
    118118    /* close the other ends of the pipes */
Note: See TracChangeset for help on using the changeset viewer.