In linux: if two process access the same file without any lock, what will happen? Considering the following cases:
1, 2. The read and write requests are essentially broken into smaller requests and these are performed in no particular order. The result is a complete jumble up. There are some exceptions to this, such as several processes appending to a file. In this case each write is atomic.
4, 6. File removal has no effect on file handles that are already open.
3,5. Same as either 1,2 or 4,6, depending on whether it's a copy or a move (== delete the target and rename the source).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With