IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13720


Ignore:
Timestamp:
Jun 8, 2007, 11:41:36 AM (19 years ago)
Author:
eugene
Message:

catching unexpected exit calls

Location:
trunk/Ohana/src/opihi/pcontrol
Files:
7 edited

Legend:

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

    r12840 r13720  
    6262
    6363  gprint (GP_ERR, "programming error: should not reach here (GetJobOutput)\n");
    64   exit (1);
     64  pcontrol_exit (1);
    6565}
  • trunk/Ohana/src/opihi/pcontrol/HostOps.c

    r12840 r13720  
    2424  }
    2525  gprint (GP_ERR, "error: unknown host stack : programming error\n");
    26   exit (1);
     26  pcontrol_exit (1);
    2727}
    2828
     
    3636  }
    3737  gprint (GP_ERR, "error: unknown host stack : programming error\n");
    38   exit (1);
     38  pcontrol_exit (1);
    3939}
    4040
  • trunk/Ohana/src/opihi/pcontrol/JobOps.c

    r12840 r13720  
    2727  }
    2828  gprint (GP_ERR, "error: unknown host stack : programming error\n");
    29   exit (1);
     29  pcontrol_exit (1);
    3030}
    3131
     
    4040  }
    4141  gprint (GP_ERR, "error: unknown job stack : programming error\n");
    42   exit (1);
     42  pcontrol_exit (1);
    4343}
    4444
  • trunk/Ohana/src/opihi/pcontrol/ResetJob.c

    r10659 r13720  
    4343    default:
    4444      gprint (GP_ERR, "unknown status for pclient command: programming error\n"); 
    45       exit (1);
     45      pcontrol_exit (1);
    4646  }
    4747
    4848  gprint (GP_ERR, "programming error in GetJobOutput (should not reach here)\n");
    49   exit (1);
     49  pcontrol_exit (1);
    5050}
    5151
  • trunk/Ohana/src/opihi/pcontrol/StopHosts.c

    r12840 r13720  
    9191    default:
    9292      gprint (GP_ERR, "unknown status for pclient command: programming error\n"); 
    93       exit (1);
     93      pcontrol_exit (1);
    9494  }
    9595  HarvestHost (host[0].pid);
     
    139139      if (result != pid) {
    140140        gprint (GP_ERR, "waitpid error: mis-matched PID (%d vs %d).  programming error\n", result, pid);
    141         exit (1);
     141        pcontrol_exit (1);
    142142      }
    143143     
     
    149149      }
    150150      if (WIFSTOPPED(waitstatus)) {
    151         if (VerboseMode()) gprint (GP_ERR, "waitpid returns 'stopped': programming error\n");
    152         exit (1);
     151        gprint (GP_ERR, "waitpid returns 'stopped': programming error\n");
     152        pcontrol_exit (1);
    153153      }
    154154  }
  • trunk/Ohana/src/opihi/pcontrol/pcontrol.c.in

    r12280 r13720  
    8585  int status;
    8686  status = opihi (argc, argv);
     87  abort ();     
    8788  exit (status);
    8889}
     90
     91void pcontrol_exit (int n) {
     92  abort ();
     93  exit (n);
     94}
  • trunk/Ohana/src/opihi/pcontrol/rconnect.c

    r13545 r13720  
    5858    status = execvp (argv[0], argv);
    5959    gprint (GP_ERR, "error starting remote shell process\n");
    60     exit (1);
     60    pcontrol_exit (1);
    6161  }
    6262  free (argv);
     
    122122  if ((result == -1) && (errno != ECHILD)) {
    123123    gprint (GP_ERR, "unexpected error from waitpid (%d): programming error\n", errno);
    124     exit (1);
     124    pcontrol_exit (1);
    125125  }
    126126  if (result == 0) {
     
    130130    if (result != pid) {
    131131      gprint (GP_ERR, "waitpid error: mis-matched PID (%d vs %d).  programming error\n", result, pid);
    132       exit (1);
     132      pcontrol_exit (1);
    133133    }
    134134    if (WIFSTOPPED(waitstatus)) {
    135135      gprint (GP_ERR, "waitpid returns 'stopped': programming error\n");
    136       exit (1);
     136      pcontrol_exit (1);
    137137    }
    138138  }
Note: See TracChangeset for help on using the changeset viewer.