Hello, > > Now I had a look at our cp.c, our cp(1) and at POSIX: > > > > -f For each existing destination pathname, remove it and > > create a new file, without prompting for confirmation, regardless of > > its permissions. The -f option overrides any previous -i options. > > > > POSIX says cp must always first try to open(2)(O_TRUNC) the > > destination and only if this fails AND -f was specified should it try > > unlink(2). > > > > At least regarding this special case our cp behaves according to > > POSIX, not according to our manpage. > > > > As long as we cannot change the POSIX standard I don't know whether > > our manpage should mention this or cp.c be changed to use lstat(), > > too. Maybe this is such a special case we could just ignore it... > > If you're interested in adapting to POSIX, here's a proposition patch:
Any comment on making cp more “POSIXy” there?
