http://qs321.pair.com?node_id=162011


in reply to forking in winblows ?

I'm not understanding the point of forking ten processes to all do a dir command on the same directory in parallel. It seems like a better move would be to send all of the threads after different resources. This leads into your problem. Windows is trying to protect it's filesystem by locking access to the directory. If you run your script enough, sometimes you get a directory listing and other times you don't. Each process is trying to run dir but entering into a deadlock situation with each other.

The only reason I can see this running on Unix is the multiuser nature of Unix. Are you running this on a FAT or FAT32 partition? These were only designed for a single user system. Thus they don't have options for reading data without locking it. I don't have access to a Windows NT box but I suspect that if you try it on a NTFS system it will work.