bug-coreutils
[Top][All Lists]
Advanced

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

Re: I: coreutils-20041123: src/touch.c regression


From: Paul Eggert
Subject: Re: I: coreutils-20041123: src/touch.c regression
Date: Mon, 03 Jan 2005 14:11:59 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Jim Meyering <address@hidden> writes:

> Your switch statement should probably handle EBADF, too,
> to avoid an unnecessary utimes call after such a failure.

EBADF shouldn't happen as it violates the futimens documentation,
which says "FD must be either negative -- in which case it is ignored
-- or a file descriptor that is open on FILE.", and the code in
question is reachable only if FD is nonnegative.  I omitted a test for
EBADF because I figured that there's no point optimizing cases that
shouldn't happen.




reply via email to

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