in reply to Re: Re: •Re: [OT] rename(2) -- renaming file to itself produces no error.
in thread [OT] rename(2) -- renaming file to itself produces no error.

No, what happened was I was looking over a source tree which I happen (unfortunately) to maintain, and there was a silly rename that was a noop. The return value was checked, but no error was generated. Because no error was generated, this logical error was never detected. So, I got pissed of at rename(2).

As for the "principle of least action", I explained my position in a previous post, and from the paragraph above you know why I prefer it :)

  • Comment on Re: Re: Re: •Re: [OT] rename(2) -- renaming file to itself produces no error.

Replies are listed 'Best First'.
Re^5: [OT] rename(2) -- renaming file to itself produces no error.
by Coruscate (Sexton) on Jan 08, 2004 at 05:35 UTC

    Now, why would you be wanting to depend on the system to have to do the thinking for you. For example, if you (or someone you know) have written code that winds up calling rename $old, $new;, where $old eq $new, then I would consider that a flaw in the thought process that went into designing the code, not the fault of the system's rename.

      Yes. And I only found it by actually reading the code. This made wonder about rename(2) behavior.