Well, in theory, it's supposed to wait. I do not use &. I have found that:
- it does not wait for "cp" commands to finish. When I say system("cp a b") or `cp a b`, it will go to the next command while b is still at file size 0.
- it does not wait for binary executables to finish. If I say system("executable > abc") or `executable > abc`, it will proceed to the next line while abc is still growing.
Could any of this behavior somehow be caused by the CGI module?