Jim Meyering <[EMAIL PROTECTED]> writes:

> please do at least simulate it once, e.g., on Linux by tweaking
> lib/openat.c so that its open always fails and it falls through to
> the save_cwd/restore_cwd code.  Then, run rm from a write-only
> directory (forcing save_cwd to use getcwd) with two relative-named
> non-empty hierarchies.  When rm is in the first openat call, and has
> changed to the top of the first hierarchy, rename the initial
> working directory so that the first restore_cwd call fails.  That
> should provoke the new diagnostic.

Yes, it did:

/home/eggert/src/gnu/cu-tune/src/rm: failed to return to initial working 
directory: No such file or directory

Thanks for the scenario.  Too bad we can't easily make tests for this
stuff....

I checked in the change.


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to