Files
splinter/libsplinter.so
T
Konrad 7fdf2c7ed1 splinter: parallel results carry who, how long, and whether it worked
Every task in a parallel handover now comes back as a header - task, model,
score, duration, exit status, size - followed by the task text and the answer,
and a summary line per model:

  [parallel: 2 task(s), 12018 ms wall]
  ## task 1 | model slow | score 5 | 12018 ms | exit 0 | 75 B | requested tag 'slow'
  ## task 2 | model fast | score 5 | 16 ms | exit 0 | 74 B | requested tag 'fast'
  ## summary
  - slow: 1 task(s), 12018 ms total
  - fast: 1 task(s), 16 ms total

Three bugs found by running it:
 * the wall clock mixed CLOCK_MONOTONIC with time(), which produced a negative
   total;
 * completion was detected through POLLHUP only, so a fast job was marked done
   when the slow one finished - both reported 12018 ms, which is precisely the
   number that must differ;
 * the children's own 'splinter: ...' lines landed in the answer, so every
   delegate looked like it had commented on itself.

Fixed with non-blocking reads plus waitpid(WNOHANG), and a filter for the child's
own diagnostics.
2026-11-08 14:20:22 +00:00

140 KiB
Executable File