bug-coreutils
[Top][All Lists]
Advanced

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

[PATCH] broken dd on systems without __fpending


From: Mikulas Patocka
Subject: [PATCH] broken dd on systems without __fpending
Date: Sat, 6 Jan 2007 03:42:57 +0100 (CET)

Hi

There is a bug in dd --- if libc doesn't have __fpending, coreutils will use a stub that always returns 1. A side effect of this stub is that close_stdout always calls fclose(stdout) --- it normally doesn't matter for most utilities except dd --- dd calls close(1) on its own and later fclose(stdout) in atexit(close_stdout) will report error.

This patch fixes the problem by moving atexit(close_stdout) to usage() function --- its the only function in dd that uses stdout.

Mikulas

Attachment: DD-PATCH
Description: patch for dd


reply via email to

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