On 6/27/07, Jim Meyering <jim@xxxxxxxxxxxx> wrote:
Without this, if you ever run out of file descriptors, dup will fail (silently), fdopen will return NULL, and fprintf will try to dereference NULL (i.e., usually segfault).
But if you check the result of fdopen for NULL instead you'll cover the dup failure _and_ out-of-memory in one go. You'll loose the errno (probably), but you don't seem to use it here anyway. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html