Changeset 4451
- Timestamp:
- Jul 4, 2005, 6:29:10 PM (21 years ago)
- Location:
- trunk/Ohana/src/opihi
- Files:
-
- 9 edited
-
pantasks/CheckJobs.c (modified) (2 diffs)
-
pantasks/ControllerOps.c (modified) (2 diffs)
-
pantasks/LocalJob.c (modified) (2 diffs)
-
pantasks/task.c (modified) (1 diff)
-
pantasks/task_command.c (modified) (1 diff)
-
pantasks/task_host.c (modified) (1 diff)
-
pantasks/task_macros.c (modified) (1 diff)
-
pantasks/task_periods.c (modified) (1 diff)
-
scripts/sched.pro (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/pantasks/CheckJobs.c
r4450 r4451 34 34 35 35 case JOB_CRASH: 36 fprintf (stderr, "job %s (%d) crash\n", job[0].task[0].name, job[0].JobID);37 36 /* run task[0].crash macro, if it exists */ 38 37 /* set the stdout and stderr variables with job.stdout, job.stderr */ 39 38 /* XXX this will break on 0 values in output streams */ 39 fprintf (stderr, "job %s (%d) crash\n", job[0].task[0].name, job[0].JobID); 40 40 set_str_variable ("stdout", job[0].stdout.buffer); 41 41 set_str_variable ("stderr", job[0].stderr.buffer); … … 49 49 case JOB_EXIT: 50 50 fprintf (stderr, "job %s (%d) exit\n", job[0].task[0].name, job[0].JobID); 51 set_str_variable ("stdout", job[0].stdout.buffer); 52 set_str_variable ("stderr", job[0].stderr.buffer); 51 53 /* run corresponding task[0].exit macro, if it exists */ 52 54 macro = job[0].task[0].def; -
trunk/Ohana/src/opihi/pantasks/ControllerOps.c
r4450 r4451 64 64 char *p; 65 65 IOBuffer buffer; 66 67 66 68 67 sprintf (cmd, "check job %d", job[0].pid); … … 179 178 job[0].pid = atoi (string); 180 179 FreeIOBuffer (&buffer); 180 181 InitIOBuffer (&job[0].stdout, 0x100); 182 InitIOBuffer (&job[0].stderr, 0x100); 181 183 return (TRUE); 182 184 } -
trunk/Ohana/src/opihi/pantasks/LocalJob.c
r4450 r4451 15 15 pid = fork (); 16 16 if (!pid) { /* must be child process */ 17 fprintf (stderr, "starting controller connection\n");17 fprintf (stderr, "starting local job\n"); 18 18 19 19 /* close the other ends of the pipes */ … … 45 45 job[0].pid = pid; 46 46 47 InitIOBuffer (&job[0].stdout, 0x100); 48 InitIOBuffer (&job[0].stderr, 0x100); 47 49 return (TRUE); 48 50 -
trunk/Ohana/src/opihi/pantasks/task.c
r3907 r4451 1 # include "basic.h"2 1 # include "scheduler.h" 3 2 # define prompt "> " -
trunk/Ohana/src/opihi/pantasks/task_command.c
r4450 r4451 1 # include "basic.h"2 1 # include "scheduler.h" 3 2 -
trunk/Ohana/src/opihi/pantasks/task_host.c
r4450 r4451 1 # include "basic.h"2 1 # include "scheduler.h" 3 2 -
trunk/Ohana/src/opihi/pantasks/task_macros.c
r3907 r4451 1 # include "basic.h"2 1 # include "scheduler.h" 3 2 # define D_NLINES 100 -
trunk/Ohana/src/opihi/pantasks/task_periods.c
r2598 r4451 1 # include "basic.h"2 1 # include "scheduler.h" 3 2 -
trunk/Ohana/src/opihi/scripts/sched.pro
r2598 r4451 1 1 2 task foo 3 command ls foo baz 4 periods -poll 2.0 5 periods -exec 1.0 6 periods -timeout 5.0 7 host kiawe 2 task test 3 command sched.test 4 periods -poll 1.0 5 periods -exec 2.0 6 periods -timeout 2.0 7 host local 8 # local is default 9 10 task.exec 11 echo "starting job sched.test" 12 end 8 13 9 14 task.exit 0 15 echo stdout: $stdout 16 echo stderr: $stderr 17 exec echo "foo bar" >> failure.log 18 output test.log 19 echo $stdout 20 output stdout 10 21 echo "successful job" 11 22 end 12 23 13 24 task.exit 1 25 echo stdout: $stdout 26 echo stderr: $stderr 14 27 echo "failed job" 15 28 end … … 22 35 echo "job timed out" 23 36 end 24 25 task.exec26 echo "starting job foo"27 end28 37 end
Note:
See TracChangeset
for help on using the changeset viewer.
