What happens when writing to a full hard drive?

3 replies · 4K views · last reply
JoAuSc
Messages
197
Reaction score
1
Let's say you're running a Fortran program that writes to the hard drive. What happens when the hard drive is completely full? Do other files get written over?
 
This is an operating system issue, not a Fortran issue. A write request that would more than consume all available disk space will fail on any reasonable operating system.
 
For DOS and Windows, the returned count of bytes written will be less than requested, and will be zero if the disk is already full.
 
JoAuSc said:
Let's say you're running a Fortran program that writes to the hard drive. What happens when the hard drive is completely full? Do other files get written over?

Your command will fail.