IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 8, 2011, 2:54:20 PM (15 years ago)
Author:
eugene
Message:

add nice ability to pantasks/pcontrol/pclient; add ports to pantasks_server; minor updates to dvo skycoverage, etc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/pclient/job.c

    r20047 r32632  
    33int job (int argc, char **argv) {
    44
    5   int i, pid, status;
     5  int i, N, pid, status, priority;
    66  char **targv;
     7
     8  priority = 0;
     9  if ((N = get_argument (argc, argv, "-nice"))) {
     10    remove_argument (N, &argc, argv);
     11    priority = atoi (argv[N]);
     12    remove_argument (N, &argc, argv);
     13  }
    714
    815  if (argc < 2) {
     
    5461  }
    5562
     63  /* set nice level for the child process */
     64  if (priority) {
     65      status = setpriority (PRIO_PROCESS, pid, priority);
     66      if (status == -1) {
     67          gprint (GP_ERR, "error setting priority\n");
     68          perror ("setpriority: ");
     69          exit (2);
     70      }
     71  }
     72
    5673  /* free temporary arg list */
    5774  for (i = 0; i < argc - 1; i++) {
Note: See TracChangeset for help on using the changeset viewer.