Dear packagers -

I examined how cleaning temporaries works with PAR and it seems it doesn't
at all.
I'm using latest PAR 0.87, perl 5.8.4 on Solaris.

My first observation was that PAR didn't remove files from /tmp/par- when a
script terminates abnormally, i.e. when signalled, even when I par'ed the
script with -C option. I thought -C is somehow broken, so I started to
"help" the PAR with PAR_GLOBAL_CLEAN which helped in one (only one) case.

The one-liner script is I used in my tests is simple:

  pp -C -p -o ex.par -e 'print "$$ nap\n"; sleep 10; print "$$ up\n"'

Results of different tests are below (each test tagged by 3-char symbol
according to legend):
  N - script not interrupted
  I - script interrupted by Ctrl+C
  X - run by parl (binary eXecutable)
  P - run by perl/PAR
  1 - run without any helpers although was par'ed with -C
  2 - run with extra helper PAR_GLOBAL_CLEAN=1
  ! - wrong
  + - correct

######## Script ends normally

NX1) parl ex.par
  BUG: leaves(!) many files in /tmp/.../cache...(!)

NX2) env PAR_GLOBAL_CLEAN=1 perl -MPAR ex.par
  OK: creates a dozen of files in /tmp/.../$$...(+) and removes them(+)

NP1) perl -MPAR ex.par
  BUG: leaves(!) a dozen of files in /tmp/.../cache...(!)

NP2) env PAR_GLOBAL_CLEAN=1 perl -MPAR ex.par
  BUG: leaves(!) a dozen of files in /tmp/.../cache...(!)
       (in this case PAR_GLOBAL_CLEAN=1 didn't help as it was with parl)

######## Script (Ctrl+C) interrupted

IX1) parl ex.par
  BUG: leaves(!) many files in /tmp/.../cache...(!)

IX2) env PAR_GLOBAL_CLEAN=1 parl ex.par
  BUG: leaves(!) two dozens of files in /tmp/.../$$...

IP1) perl -MPAR ex.par
  BUG: leaves(!) a dozen of files in /tmp/.../cache...(!)

IP2) env PAR_GLOBAL_CLEAN=1 perl -MPAR ex.par
  BUG: creates a dozen of files in /tmp/.../cache(!)... and doesn't remove
them

---

Am I doing something wrong?

Thanks,
Waldemar.

Reply via email to