[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] fix infinite loop eating all the memory

From: Alfred M\. Szmidt
Subject: Re: [PATCH] fix infinite loop eating all the memory
Date: Fri, 07 Oct 2005 17:48:05 +0200

   `tail -f /dev/zero` eats all the available memory and swap until
   tail gets killed by the OOM killer (on linux, at least).

Since /dev/zero is of "infinite" size, tail does the right thing in
reading it until all memory/swap is exhausted.

,----[ (standards)Semantics ]
| 4.1 Writing Robust Programs
| ===========================
| Avoid arbitrary limits on the length or number of _any_ data structure,
| including file names, lines, files, and symbols, by allocating all data
| structures dynamically.  In most Unix utilities, "long lines are
| silently truncated".  This is not acceptable in a GNU utility.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]