Jim Meyering wrote:
> On HP-UX, rm has to use a different code path for that case, since the
> system provides neither openat-like functions, nor a /proc/self/fd-like
> way to emulate them.
> 
> Does this patch solve the problem?
> ...
> +# HP-UX 11.11 goes a different route, too.
> +# ...: unable to record current working directory: Permission denied
> +sed 's/: unable to record current.*/: Permission denied/'<out>o1;mv o1 out

Not quite.  Almost.  But this different sed line does solve the output
differences.

  sed "s/: unable to record current.*/: cannot remove \`rel': Permission 
denied/"<out>o1;mv o1 out

However the test still failed.  Looking deeper I see this:

  + test -d 
/usr/local/build/coreutils/hppa-hpux11.11-gcc-coreutils/build/tests/rm/inaccessible.tmp/1226/abs1
  + fail=1
  + test -d 
/usr/local/build/coreutils/hppa-hpux11.11-gcc-coreutils/build/tests/rm/inaccessible.tmp/1226/abs2
  + fail=1

This is the test code:
  (cd no-access; chmod 0 . && rm -r $p/abs1 rel $p/abs2) 2> out && fail=1

But the $p/abs1 and $p/abs2 dirs are not removed.  The rm fails
earlier, bails out, and those directories remain unremoved.  Hmm...

Bob


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

Reply via email to