[Mailman-Users] List Sync Problem
gward at mems-exchange.org
Tue Dec 4 15:56:30 CET 2001
On 04 December 2001, Jon Carnes said:
> 2) The following line (added to the script) may not work as you desire:
> "cat /tmp/ise-all_list | grep -vi archive > /tmp/ise-all_list"
> You are outputing from the same file that you are inputing to... If it
> can't do this in one read, then you may end up with a blank file.
That's almost certainly a problem. I'm surprised the script works at
all. Back when I was a Unix neophyte, I naively played around with that
sort of thing, and it always failed. I'm pretty sure the shell does
before "cat" even gets a chance to open it for reading. (Possibly even
before it forks and execs cat.)
Hmmm: perhaps the shell forks and execs cat, and *then* opens
/tmp/ise-all_list for writing: bang, you've got a race condition, which
explains why the script sometimes works and sometimes fails.
Greg Ward - software developer gward at mems-exchange.org
MEMS Exchange http://www.mems-exchange.org
More information about the Mailman-Users