Runaway train
I might be testing an unfinished program. A bug causes the program to write six bazillion lines to an output file. Is there a way to prevent this? A way for Linux Mint to detect a runaway train?
This has not happened (honest!) but the possibility is worrisome. Daniel B. Martin |
Code:
~$ help ulimit It might also be worth limiting virtual memory (ulimit -v) to somewhere around the size of your physical RAM to prevent a single program with a major memory leak from filling up your swap space (this tends to slow down the entire system as it writes to swap). |
Quote:
There is a much better way of handling runaway programs and files. You need to create a separate partition for the output of such un-trusted programs. A partition of modest size such as 100 - 500 MB would fill up fast and then generate an error code if writes were attempted to a full file system. You would need to check the error code after each write operation to this small partition. Filling up a small separate partition wouldn't affect your main file system. This separate partition technique is traditionally used by developers to keep an un-trusted program from filling up your main file system. |
|
All times are GMT -5. The time now is 10:11 AM. |