Changeset 20324
- Timestamp:
- Oct 21, 2008, 7:06:44 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/pcontrol/CheckIdleHost.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/pcontrol/CheckIdleHost.c
r18098 r20324 1 1 # include "pcontrol.h" 2 3 static FILE *logfile = NULL; 2 4 3 5 /* the supplied host is not on a stack: it cannot be taken by the other thread */ … … 7 9 Stack *stack; 8 10 Job *job; 11 12 if (logfile == NULL) { 13 logfile = fopen ("pcontrol.log", "w"); 14 } 9 15 10 16 ASSERT (host, "host not set"); … … 32 38 host[0].job = (struct Job *) job; 33 39 40 if (logfile) fprintf (logfile, "start needhost %s (job host %s) : %s\n", host[0].hostname, job[0].hostname, job[0].argv[0]); 41 34 42 /* take the job off the stack and unlock the stack */ 35 43 RemoveStackEntry (stack, i); … … 50 58 host[0].job = (struct Job *) job; 51 59 60 if (logfile) fprintf (logfile, "start wanthost %s (job host %s) : %s\n", host[0].hostname, job[0].hostname, job[0].argv[0]); 61 52 62 /* take the job off the stack and unlock the stack */ 53 63 RemoveStackEntry (stack, i); … … 66 76 host[0].job = (struct Job *) job; 67 77 78 if (logfile) fprintf (logfile, "start anyhost %s (job host %s) : %s\n", host[0].hostname, job[0].hostname, job[0].argv[0]); 79 68 80 /* take the job off the stack and unlock the stack */ 69 81 RemoveStackEntry (stack, i); … … 80 92 if (job[0].mode != PCONTROL_JOB_WANTHOST) continue; 81 93 // XXX test the job age and skip if too young 94 95 if (logfile) fprintf (logfile, "start wanthost(2) %s (job host %s) : %s\n", host[0].hostname, job[0].hostname, job[0].argv[0]); 82 96 83 97 /* we have found an appropriate job; link it to the host and send to StartJob */
Note:
See TracChangeset
for help on using the changeset viewer.
