Can you clean up temporary files before they are used in shell?
This is tested in csh, tcsh, sh, ksh, zsh, bash, ash, sash:
echo foo > the-file
(rm the-file; cat) < the-file | do_slow_processing
or if you prefer:
(rm the-file; do_slow_processing) < the-file
Interestingly, it also works for fifos:
mkfifo the-fifo
(rm the-fifo; cat) < the-fifo | do_slow_processing &
echo foo > the-fifo
This is because the reader is blocked until something is written.