in reply to Re^3: Windows-specific: Limiting output of created files
in thread Windows-specific: Limiting output of created files

The problem then is how tee finds out the pid of the producer process?

The monitor could use a syntax similar to strace.

limit_output 1_000_000 monitored_process.exe

Having launched the monitored process puts limit_output in a position to monitor and control it.

Update: Ah shoot. I think you already mentioned this.