On kernel 2.2 and 2.4, both ext2:
What happens if a cronjob(root) attempts mv /var/spool/mail/bucket someOtherFilename while sendmail is appending another message to user bucket's inbox at the same time. - Is there a chance to corrupt the file, or the file system? - a quick search points to 'chattr +S fileName' to achieve synchronous behavior -- a more extented search extended the confusion on my end... How does the kernel respond to a second write/move request while the file is written to? a) reject the request, or b) wait and do it later? - because of potential risks I hesitate to simply 'try it' I am more interested in a general clarification than a work-around for the mv command, a) because it is a general issue b) because the script logic depends on the presence of the two files involved. - Horst P.S. This is on a running, remote system where modification of fstab and reboot is not a good option.
